sunbeam_coders
05-19-2011, 05:32 PM
The data is assigned via a form on a separate page being posted to a second page.
This is the update page but I keep a failed message -
I have done an exit to the query to see if the data is being assigned correctly and it is - so I am guessing that the issue is actually when it attempts to write the data into the database.
I have been working on this for a long time now trying to figure it out - any help to resolve this issue will be greatly appreciated.
Thanks
<?php
$feild1_namep = $_POST['field1_name'];
$field2_descp = $_POST['field2_desc'];
$field3_categoryp = $_POST['field3_category'];
$field4_approvalp = $_POST['field4_approval'];
$query = "UPDATE products SET ";
$query .= "field1_name='$field1_namep',field2_desc='$field2_descp',field3_category='$field3_category',field4_ap provalp='field4_approval',";
$query .= "WHERE field1_name = '$field1_namep'";
$result = mysql_query ($query)
or die ("failed");
echo "<center>Product Updated.</center>";
?>
This is the update page but I keep a failed message -
I have done an exit to the query to see if the data is being assigned correctly and it is - so I am guessing that the issue is actually when it attempts to write the data into the database.
I have been working on this for a long time now trying to figure it out - any help to resolve this issue will be greatly appreciated.
Thanks
<?php
$feild1_namep = $_POST['field1_name'];
$field2_descp = $_POST['field2_desc'];
$field3_categoryp = $_POST['field3_category'];
$field4_approvalp = $_POST['field4_approval'];
$query = "UPDATE products SET ";
$query .= "field1_name='$field1_namep',field2_desc='$field2_descp',field3_category='$field3_category',field4_ap provalp='field4_approval',";
$query .= "WHERE field1_name = '$field1_namep'";
$result = mysql_query ($query)
or die ("failed");
echo "<center>Product Updated.</center>";
?>