I didn't know what to use as a title for this. Here is the scenario:
I have a op.reqedit.php page. This page a form where you input data.
In this page I have split a MySQL field. It is called
MachineTypeOfWo rk and is split into Replace, Adjusted, REbuild,
Inspected and Repair. These all become check boxes for the user. The
form submits to op.reqadd.php. In this page I first have a hidden box
where I combine all of the above into Type (this works fine, I have
unhidden the box to see it). Then I have
$MachineTypeofW ork = $_GET['Type'];
$sql_query = mysql_query("UP DATE results SET (a bunch of fields)
MachineTypeOfWo rk='$MachineTyp eofWork' WHERE WorkOrder = '$wo'") or die
(mysql_error()) ;
My problem is that it updates all of the fields it should except the
MachineTypeOfWo rk field in MySQL. It actually overwrites what is
already there with nothing.
What I do not know (I am new) is can I combine the field and pass it to
the database in the same page or do I need another page in the
background for this?
ANy help is appreciated.
Tina
I have a op.reqedit.php page. This page a form where you input data.
In this page I have split a MySQL field. It is called
MachineTypeOfWo rk and is split into Replace, Adjusted, REbuild,
Inspected and Repair. These all become check boxes for the user. The
form submits to op.reqadd.php. In this page I first have a hidden box
where I combine all of the above into Type (this works fine, I have
unhidden the box to see it). Then I have
$MachineTypeofW ork = $_GET['Type'];
$sql_query = mysql_query("UP DATE results SET (a bunch of fields)
MachineTypeOfWo rk='$MachineTyp eofWork' WHERE WorkOrder = '$wo'") or die
(mysql_error()) ;
My problem is that it updates all of the fields it should except the
MachineTypeOfWo rk field in MySQL. It actually overwrites what is
already there with nothing.
What I do not know (I am new) is can I combine the field and pass it to
the database in the same page or do I need another page in the
background for this?
ANy help is appreciated.
Tina
Comment