Very much to the point, i have a table which i echo information to. Also in this table i have x3 drop down menus consisiting of important selections. I am trying to make appropriate changes via the drop down menus and then submit, at which point the submit button looks as though it's doing something, BUT unfortunately nothing seems to be, and the DB does not update.
I have had this problem for a while now , and im really not understanding why it isn't updating . If anyone can see a reason as to why my code does not work, i would be so so so glad to hear.
The only kind of uncertainty i have is that my INSERT query maybe placed in the wrong area of the code, but im not 100% sure.
And can anyone clarify whether PHP and MySQL allows you echo and modify information in the same form, because at the moment i'm having doubts, which may be false.
Here is my code
$query ="SELECT * FROM admin WHERE AdminID= '" . $_SESSION['admin_logged']."'
AND password =(password('" . $_SESSION['admin_password'] . "'));";
$result = mysql_query($query) or die(mysql_error());
$new = mysql_fetch_array($result);
<title>Fault Reporting System : : Complete A Call</title>
<div align="center"><h2>Welcome <? echo $new['First_Name']; ?>.<br> Please Select A Call You Would Like To Complete</h2></div>
$q1 = "SELECT FaultID, AdminID, StaffID, Location, Problem_Desc, Date
WHERE AdminID= '" . $_SESSION['admin_logged']."'
AND Progress = 'Ongoing'";
$result1 = mysql_query($q1) or die(mysql_error());
// updating the database
if ($_POST['submit'] == "submit")
if ($_POST['Technician_Comment'] != "" && $_POST['Progress'] != "" && $_POST['Complete'] != "")
<option value="" SELECTED>Select Comment...</option>
<option value="Working fine now">Working fine now</option>
<option value="Sent back to manufacturer">Sent back to manufacturer</option>
<option value="3rd party coming in to look at it">3rd party coming in to look at it</option>
<option value="Need more time">Need more time</option>
<option value="" SELECTED>Select Progress...</option>
Also (just for anal-retentiveness) try specifying the resource when using mysql_query() and cleaning up your objects after each query (ie. mysql_free_result()).
If that doesn't help, try echoing out the INSERT query, and other potential buggy areas to find out if the query is bad, or if the script is getting stuck somewhere. And then maybe post a more readable version of the relevant pieces of code (and debug comments) after you've narrowed it down ?