Jump to content

Recommended Posts

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]
<?php
session_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 include

include("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
Link to comment
https://forums.phpfreaks.com/topic/27176-plz-help-with-code/
Share on other sites

[code]
<?php
session_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 include

include("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 :/
Link to comment
https://forums.phpfreaks.com/topic/27176-plz-help-with-code/#findComment-124257
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.