please help, i have been working on this for 2 days now, i cant seem to know why my database won’t update. the function of my program is this
from the main page,when a file’s status is ‘Pending’ a pop up link appears that directs it to the confirm.php
my confirm.php ask the admin if he/she would approve the file uploaded by the sa. the confirm.php contains to link buttons, YES and NO. when the admin clicks on yes,The database should change my confirmation table from PENDING to APPROVED. that also goes with the no, but it changes PENDING to NOTAPPROVED. I’m guessing the problem is within the confirm.php or the membersite.php where all functions are located. here is my code(I wont right it all because its too long)
**NOTE problem solved thanks guys
mysql_query($yes)is your problem. You already did your query the line above there and you’re trying to do another query with something that is not an SQL string and so the page dies. Pending your autocommit setting, it’s possible nothing gets changed.The second problem I see is that the page likely doesn’t make it, because you close the window on click. Check your webserver logs if you ever see a request for “confirm.php?yes=123”. You should probably test confirm.php with a valid employee number in your browser. If that is working, your problem is not the php code or query, but the fact that the javascript prevents the request from ever getting sent to the server.