Jump to content

[SOLVED] Parse error: syntax error, unexpected T_IF --> line 35


Marshmellow

Recommended Posts

"Parse error: syntax error, unexpected T_IF --> line 35" is the error I get when running this code:

 

29 <?PHP
30 ini_set ('display_errors', 1);
31 error_reporting(E_ALL & E_NOTICE); 
32 require_once('connect.php');
33 print "<table border=\"0\">"
34 if($r = mysql_query('SELECT * FROM rentals ORDER BY date_entered DESC')) {
35 	while($row = mysql_fetch_array($r)) {
36 		print "<tr><td><a href=\"view_rental.php?id={$row['id']}\">{$row['name']}</a></td><td>{$row['description']}</td></tr>";
37	}
38 }
39 else {
40 	die('<p>Retrieval error: ' . mysql_error() . '</p>');
41 }
42 print "</table>"
43 mysql_close();
44 ?>

 

The only previous php code is:

26 <?PHP include_once("navigation.php"); ?>

 

Does anyone know what I did wrong? Any help is greatly appreciated. I can list the code of the linked files if necessary.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.