Hello All:
I'm trying to run a script and I'm receiving the following message:
Parse error: parse error in /usr50/home/summitwe/public_html/edit.php on line 86
I've tried a number of things and I can't seem to get the script to work.
At this point, the script is creating a select menu displaying a list of names from the database. When a person selects the name from the menu, a form should appear with all the information for the selected person. The goal of this script is to be able to update the information for the selected person. So, the form is supposed to display the information that is currently in the table for the selected person.
I have not written the update query yet. For now, I'm just trying to display the information.
Here is line 86. After linr 86, I also added some lines before and after line 86 in case the problem is elsewhere. I hope someone can help me out. Thank you so very much !!!!!
Line 86:
<input type=hidden name=\"id\" value="<?php echo $id ?>">
-----------------------------------------Additional code before and after
$get_info = "select * from customer where id = $_POST[sel_id]";
$get_info_res = mysql_query($get_info);
if (mysql_num_rows($get_info_res) > 0) {
$display_block .= "
<P><b><font size=\"2\" face=\"Verdana\">Customer Information:</b><br><br>";
while ($add_info = mysql_fetch_array($get_info_res)) {
$id = $add_info[id];
$fname = $add_info[fname];
$lname = $add_info[lname];
$company = $add_info[company];
$address = $add_info[address];
$city = $add_info[city];
$state = $add_info[state];
$zipcode = $add_info[zipcode];
$homephone = $add_info[homephone];
$workphone = $add_info[workphone];
$email1 = $add_info[primaryemail];
$email2 = $add_info[secondaryemail];
}
}
$display_block .= "
<form action=\"edit.php\" method=\"post\">
<input type=hidden name=\"id\" value="<?php echo $id ?>">
First Name:<INPUT TYPE=\"TEXT\" NAME=\"fname\" VALUE="<?php echo $fname ?>" SIZE=30><br>
Last Name:<INPUT TYPE=\"TEXT\" NAME=\"lname\" VALUE="<?php echo $lname ?>" SIZE=30><br>
Company:<INPUT TYPE=\"TEXT\" NAME=\"company\" VALUE="<?php echo $company ?>" SIZE=30><br>
Address:<INPUT TYPE=\"TEXT\" NAME=\"address\" VALUE="<?php echo $address ?>" SIZE=30><br>
City:<INPUT TYPE=\"TEXT\" NAME=\"city\" VALUE="<?php echo $city ?>" SIZE=30><br>
State:<INPUT TYPE=\"TEXT\" NAME=\"state\" VALUE="<?php echo $state ?>" SIZE=3><br>
Zip Code:<INPUT TYPE=\"TEXT\" NAME=\"zipcode\" VALUE="<?php echo $zipcode ?>" SIZE=10><br>
Home Phone:<INPUT TYPE=\"TEXT\" NAME=\"homephone\" VALUE="<?php echo $homephone ?>" SIZE=25><br>
Work Phone:<INPUT TYPE=\"TEXT\" NAME=\"workphone\" VALUE="<?php echo $workphone ?>" SIZE=25><br>
Primary Email Address:<INPUT TYPE=\"TEXT\" NAME=\"email1\" VALUE="<?php echo $email1 ?>" SIZE=70><br>
Secondary Email Address:<INPUT TYPE=\"TEXT\" NAME=\"email2\" VALUE="<?php echo $email2 ?>" SIZE=70><br>
<input type=\"hidden\" name=\"choice\" value=\"edit\">
<input type=\"submit\" name=\"submit\" value=\"submit\">
</form>"
<br><br><p><font size=\"2\" face=\"Verdana\"><a href=\"$_SERVER[PHP_SELF]\">Select Another Customer</a></p></font>";
}
?>
<html>
<head>
<title>template</title>
</head>
<body>
<?php echo $display_block; ?>
</body>
</html>