Ameslee Posted November 14, 2006 Share Posted November 14, 2006 hi hope someone can help me. I keep getting "Parse error: syntax error, unexpected $end in /home/blah/public_html/maintain/edit_exhibit2.php on line 54". I can not work out how to fix it.here is the code:[code]<?phpsession_start();include ("checklow.inc");?><html><head><title>Edit Exhibit Details</title></head><body bgcolor="#CCCCFE"><form method=POST action="edit_exhibit3.php"><h3>Edit Exhibit Details</h3><?php//database includeinclude("database.inc");$query = "select * from `exhibits` where serviceid=$id";$mysql_result=mysql_query($query,$conn);$row=mysql_fetch_row($mysql_result);echo <<<exhibits<table><tr><td><input type="hidden" name="serviceid" value="$row[0]">Exhibit<td><input type="text" name="exhibit" value="$row[1]"><tr><td>Located<td><input type="text" name="located" value="$row[2]"><tr><td>Services<td><textarea name="services" row="5" cols="30">$row[3]</textarea><tr><td>Contact <td><input type="text" name="contact" value="$row[4]"><tr><td>Phone Number<td><input type="text" name="number" value="$row[5]"> <tr><td>Category<td><input type="text" name="category" value="$row[6]"> </table><p><input type="submit" value="Edit Details">?></table></form></body></html>[/code]if i take out [code]echo <<<exhibits[/code] then i get another error saying there is an unexpected <hope someone can help, thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/ Share on other sites More sharing options...
marcus Posted November 14, 2006 Share Posted November 14, 2006 [code]<?phpsession_start();include ("checklow.inc");?><html><head><title>Edit Exhibit Details</title></head><body bgcolor="#CCCCFE"><form method=POST action="edit_exhibit3.php"><h3>Edit Exhibit Details</h3><?php//database includeinclude("database.inc");$query = "select * from `exhibits` where serviceid=$id";$mysql_result=mysql_query($query,$conn);$row=mysql_fetch_row($mysql_result);echo '<table><tr><td><input type="hidden" name="serviceid" value="$row[0]">Exhibit<td><input type="text" name="exhibit" value="$row[1]"><tr><td>Located<td><input type="text" name="located" value="$row[2]"><tr><td>Services<td><textarea name="services" row="5" cols="30">$row[3]</textarea><tr><td>Contact <td><input type="text" name="contact" value="$row[4]"><tr><td>Phone Number<td><input type="text" name="number" value="$row[5]"> <tr><td>Category<td><input type="text" name="category" value="$row[6]"> </table><p><input type="submit" value="Edit Details">';?></table></form></body></html>[/code]you can try that :/ Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124257 Share on other sites More sharing options...
Ameslee Posted November 14, 2006 Author Share Posted November 14, 2006 ok its displaying the page but in the fields where u can edit, just states $row[1] and so onplz help? Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124262 Share on other sites More sharing options...
Zane Posted November 14, 2006 Share Posted November 14, 2006 that's not gonna work with single quotes....it'lll just echo the name of the variable.I think what he was missing wasexhibits;right before your last?> Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124265 Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 I believe you are missing a [b]}[/b] (closing brace) somewhere. Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124290 Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 OR... you my be echoing it out wrong[code]<?$str = <<<EODExample of stringspanning multiple linesusing heredoc syntax.EOD;?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124293 Share on other sites More sharing options...
Ameslee Posted November 14, 2006 Author Share Posted November 14, 2006 it seems to be working fine now, thanks. without the closing [b]{[/b] so i wont worry about it.thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124320 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.