Forum Moderators: coopster
This is throwing the script, how can I properly UPDATE the specified fields?
THanks in advance :)
$result = MYSQL_QUERY("UPDATE customerMaster WHERE order_Num = $_GET['order']
date= '$date',
territory= '$territory',
salesRep= '$salesRep',
repEmail= '$repEmail',
facility= '$facility',
address= '$address',
contact1= '$contact1',
department1= '$department1',
phone1= '$phone1',
fax1= '$fax1',
email1= '$email1',
contact2= '$contact2',
department2= '$department2',
phone2= '$phone2',
fax2= '$fax2',
email2= '$email2',
comments= '$comments',
gpo= '$gpo',
otherDiscounting='$otherDiscount'");
$result = MYSQL_QUERY("UPDATE customerMaster SET
date= '$date',
territory= '$territory',
salesRep= '$salesRep',
repEmail= '$repEmail',
facility= '$facility',
address= '$address',
contact1= '$contact1',
department1= '$department1',
phone1= '$phone1',
fax1= '$fax1',
email1= '$email1',
contact2= '$contact2',
department2= '$department2',
phone2= '$phone2',
fax2= '$fax2',
email2= '$email2',
comments= '$comments',
gpo= '$gpo',
otherDiscounting='$otherDiscount'
WHERE order_Num = $_GET['order']");
I think that will work ... of course, since there's been all sorts of threads on security lately, passing the $_GET['order'] directly to the query can be a bad thing ....
-sned
I always do it a little different and this should help you debug:
$MysqlMessage = "UPDATE customerMaster SET date= '$date',
territory= '$territory',
salesRep= '$salesRep',
repEmail= '$repEmail',
facility= '$facility',
address= '$address',
contact1= '$contact1',
department1= '$department1',
phone1= '$phone1',
fax1= '$fax1',
email1= '$email1',
contact2= '$contact2',
department2= '$department2',
phone2= '$phone2',
fax2= '$fax2',
email2= '$email2',
comments= '$comments',
gpo= '$gpo',
otherDiscounting='$otherDiscount
WHERE order_Num = $_GET['order']";
$result = MYSQL_QUERY($MysqlMessage);
and for debug look at the query like this:
echo $MysqlMessage;
maybe someone else can clean that up a little
hope that helps