Jump to content


Parse error: parse error, unexpected T_STRING


1 reply to this topic

#1 richie17

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 09 January 2009 - 12:54 PM

why am i getting

Parse error: parse error, unexpected T_STRING in /home/hr728/public_html/gigbookers/events/update2.php on line 47

line 47 = mail($email, $subject, $body);

thank you for anyone that can help

while($row = mysql_fetch_assoc( $result ))
	{
		$current_venue = $row['venue'];
		$current_artist = $row['artist'];
		$current_date = $row['date'];
		$current_price = $row['price'];
		$firstname = $row['firstname'];
		$lastname = $row['lastname'];
		$email = $row['email'];
		
		$sender = "Gig Bookers";
		$subject = "Event Cancelled";
		$web = "Gig Bookers";
		$msg = "Gig Bookers - $firstname $lastname Sorry to let you know that the event:
			   $current_artist playing at $current_venue on $current_date has been cancelled";
		
		$body = "Sender: " . $sender . "\n\nWebsite: " . $web . "\n\nMessage:\n\n" . $msg;
		
		if( $status == "Cancelled" ) {
   		mail($email, $subject, $body);
  		}

	}


#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 January 2009 - 01:09 PM

You shouldn't be. There is nothing wrong with the block of code you provided. The unexpected T_STRING is usually caused by a missing '.' between the concatenatoin of strings or a semi-colon at the end of a statement.

I just ran what code you had, and it parsed fine for me. That means either you are looking at the wrong file, or there is something else missing and we need to look at the whole file and not just that block (i'm betting on the former though).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users