Hi,
I need to make a problem registration system, in PHP. I really dont much about PHP, i just started. Luckly, i knew some javascript so variable's are no problems.
Now i got the registration just fine, check it out here:
This one is working perfectly.
But i also needed to build a status system in it. So the employees can accept a problem, or discard it. So my solution was to make a new row in the database, and call that status. Then in my PHP do an IF statement on it. Like this:
<? php
if ($rows['status']=="1") //if status equals 1
echo "Nog niet aangenomen"; //say not yet accepted (its dutch :))
elseif ($rows['status']=="2") //If status equals 2
echo "In behandeling"; //say accepted
else
echo "Geen status"; //else say no status
?>
But that isnt working, i get this error when i include it in the code:
Parse error: parse error, unexpected T_IF in /home/www/regsys.freehostia.com/beheer.php on line 56
So i just deleted that part, and concentrated on the status change.
Now what i need is a button that updates the content of the row status, for only one entry.
Like this:
Status=1 //in mysql
(click button) //in php
Status=2 //in mysql
And it would be nice if that if else thing would work too 😉