I have a table with values in all the fields, except one, that is waiting to be assigned a value, based on the value of another field.
I used an if else statement to determine the value of the field $remaining. If it's 0, then the value of $notes is available. If it's anything other than 0, the value of $notes is sold out.
The rest of the page just loops with a while ($row = mysql_fetch_row($result)) line.
This is the part of the code in question.
$query = "select * from theater";
if (!$result = mysql_query($query,$dbconnect))
{
echo mysql_error();
exit;
}
if($remaining != 0)
{
$notes = 'Available';
}
elseif($remaining == 0)
{
$notes = 'Sold Out';
}
What I want to do is insert the value of $notes into the table in the notes field and be able to display that value along with the rest of the table that already exists.
Any help?
Thanks,
Lala