Jump to content

Table that updates database? (Code shown)


leo7068

Recommended Posts

Please help me troubleshoot this code which gives a Parse error:

 

<?
if (isset($_POST['submit']))
{
$UpdateQueryonSubmit="UPDATE QA SET room_number = '{$_POST['room_number']}', TV = '{$_POST['TV']}', TV_Date = '{$_POST['TV_Date']}', mWave = '{$_POST['mWave']}', mWave_Date = '{$_POST['mWave_Date']}' WHERE room_number= $_POST['roomID']";
mysql_query($UpdateQueryonSubmit);
}
?>

 

Gives this error:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

 

referring to line:

 

room_number= $_POST['roomID']"

Link to comment
https://forums.phpfreaks.com/topic/200306-table-that-updates-database-code-shown/
Share on other sites

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.