I am trying to run the following but am getting the following mysql error ?
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO hqfjt_chronoforms_data_addupdatelead SET f9f2ec4270a751f4f34980c325e' at line 2
<?php
$user = $_POST[cf_uid];
$form = $_POST[uid];
$date = date("d-m-Y");
$query = mysql_query("UPDATE hqfjt_chronoforms_data_addupdatelead SET $form = $date
WHERE cf_uid = $user
")
or die(mysql_error());
?>
what I am trying to do, is use the $USER to find the correct user record, then in that user record find the column $form and insert the $date into it,
EDIT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Ok this gets me halfway there, but still an error >>
<?php
$user = $_POST[cf_id];
$form = $_POST[uid];
$date = date("d-m-Y");
$query = mysql_query("UPDATE hqfjt_chronoforms_data_addupdatelead SET '".$form."' = '".$date."' WHERE cf_id = '".$user."'")
or die(mysql_error());
?>
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''185cfb5654aacf3038e3f26491f227356b5d768f' = '30-12-2011' WHERE cf_id = '14'' at line 1