colleyboy Posted July 8, 2010 Share Posted July 8, 2010 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? Link to comment https://forums.phpfreaks.com/topic/207181-parse-error-syntax-error-unexpected-t_variable-in-line-96/ Share on other sites More sharing options...
kenrbnsn Posted July 8, 2010 Share Posted July 8, 2010 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 Link to comment https://forums.phpfreaks.com/topic/207181-parse-error-syntax-error-unexpected-t_variable-in-line-96/#findComment-1083275 Share on other sites More sharing options...
Mchl Posted July 8, 2010 Share Posted July 8, 2010 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\">.... Link to comment https://forums.phpfreaks.com/topic/207181-parse-error-syntax-error-unexpected-t_variable-in-line-96/#findComment-1083276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.