Jump to content

Parse error: syntax error, unexpected T_VARIABLE in line 96


colleyboy

Recommended Posts

I am getting this error when trying to open the php page:

 

Parse error: syntax error, unexpected T_VARIABLE in /home/wormste1/public_html/tilburywebdesign/shop/FTPServers/motorshop/stock/manage/search.php on line 97

 

 

this is the code around that error area:

 

$HTMLoutput .= "<td><font size=\"2\">{$r['web']}</td>\n";
$HTMLoutput .= "<td><font size=\"2\"><CENTER><a href=\"update.php?id={$r['id']}\">Modify</A></CENTER></td>\n";
$HTMLoutput .= "<td><font size=\"2\"><CENTER><a href=\"delete.php?id={$r['id']}\">Delete</A></CENTER></td>\n";
$HTMLoutput .= "<td><font size=\"2\"><CENTER><form action=\"quantity.php\" method=\"POST\">
<input type=\"hidden\" name=\"ud_id\" value=\"<? echo "$id"; ?>\"><input type=\"hidden\" name="ud_first" value=\"<? echo "$first"?>\"><br><BR>
<input type=\"hidden\" name=\"ud_last\" value="<? echo "$last"?>">
<input type=\"hidden\" name=\"ud_phone\" value="<? echo "$phone"?>">
<input type=\"hidden\" name=\"ud_mobile\" value="<? echo "$mobile"?>">
<input type=\"hidden\" name=\"ud_fax\" value="<? echo "$fax"?>">
<input type=\"hidden\" name=\"ud_email\" value="<? echo "$email"?>">
<input type=\"hidden\" name=\"ud_web\" value="<? echo "$web"?>\">
<input type=\"Submit\" value=\"Reduce Quantity\">
</form></CENTER></td>\n";
$HTMLoutput .= "</tr>\n";
$HTMLoutput .= "<tr><td colspan=\"7\" bgcolor=\"#FFFFFF\"></td></tr>\n"; 
}
$HTMLoutput .= "</table>\n"; 
} 

 

Any ideas?

Which is line 97?

 

You're already in PHP so you can't do

value=\"<? echo "$first"?>\"

do

<?php
$HTMLoutput .= "<td><font size=\"2\"><CENTER><form action=\"quantity.php\" method=\"POST\">
<input type=\"hidden\" name=\"ud_id\" value=\"" . $id . ""><input type=\"hidden\" name="ud_first" value=\"" . $first . ""><br><BR>

 

Ken

Which one is line 97?

 

It looks like you got confused a bit with your strings here:

$HTMLoutput .= "<td><font size=\"2\"><CENTER><form action=\"quantity.php\" method=\"POST\">
<input type=\"hidden\" name=\"ud_id\" value=\"<? echo "$id"; ?>\"><input type=\"hidden\" name="ud_first" value=\"<? echo "$first"?>\"><br><BR>
<input type=\"hidden\" name=\"ud_last\" value="<? echo "$last"?>">
<input type=\"hidden\" name=\"ud_phone\" value="<? echo "$phone"?>">
<input type=\"hidden\" name=\"ud_mobile\" value="<? echo "$mobile"?>">
<input type=\"hidden\" name=\"ud_fax\" value="<? echo "$fax"?>">
<input type=\"hidden\" name=\"ud_email\" value="<? echo "$email"?>">
<input type=\"hidden\" name=\"ud_web\" value="<? echo "$web"?>\">
<input type=\"Submit\" value=\"Reduce Quantity\">
</form></CENTER></td>\n";

 

You don't need to echo variables in it:

$HTMLoutput .= "<td><font size=\"2\"><CENTER><form action=\"quantity.php\" method=\"POST\">
<input type=\"hidden\" name=\"ud_id\" value=\"$id"\"><input type=\"hidden\" name="ud_first" value=\"$first\"><br><BR>
<input type=\"hidden\" name=\"ud_last\" value=\"$last\">
<input type=\"hidden\" name=\"ud_phone\" value=\"$phone\">....

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.