Hi all,
I am new to PHP and hope someone can help me.
I have a very simple script as below and when I run this I get the following error:
Parse error: syntax error, unexpected $end in c:\wamp\www\test\index.php on line 59Line 59 is a blank line.
**********************************************
<?php
include("config.inc.php"); // here I connect to database and it works fine
$result = mysql_query( "SELECT category_id,category_name FROM gallery_category" );
while( $row = mysql_fetch_array( $result ) )
{
$photo_category_list .=<<<__HTML_END
<option
value="$row[0]">$row[1]</option>\n
__HTML_END;
}
mysql_free_result( $result );
// Final Output
echo <<<__HTML_END
<html>
<head>
<title>Gallery View</title>
</head>
<body>
<form enctype='multipart/form-data' action='index.php' method='post' name='upload_form'>
<table width='100%' border='0' align='center' style='width: 100%;'>
<tr>
<td>
Select Product Category:
</td>
</tr>
<tr>
<td>
<select name='category'>
$photo_category_list
</select>
</td>
</tr>
<tr>
<td >
<input type='submit' VALUE="GO" />
</td>
</tr>
</table>
</form>
</body>
</html>
__HTML_END;
?>
***************************************************[/I]
I even searched for the answer on the internet and most of time the only answer I found is the some
closing braces are missing.
But as my code is very simple I don't see any such misstake.
Can someone see in my code that what else I am missing.
thanks for help
regards
/rsasalm