Code:
$name = sanitize($_POST['name'], "text");
$designation = sanitize($_POST['designation'], "text");
$phone = sanitize($_POST['phone'], "int");
$date = sanitize($_POST['date'], "text");
$id = sanitize($_POST['id'], "text");
$new_id = create_guid();
include_once "connect.php";
$update_sql = "UPDATE `projects` SET `Name`={$Name}, `id`='{$new_id}' WHERE `projects`.`id`={$id};";
$update_result = mysql_query($update_sql);
mysql_free_result($update_result);
Warning: mysql_free_resu lt() expects parameter 1 to be resource, boolean given in C:\Program Files\xampp\htd ocs\badger.php on line 211
Can anyone tell me whats the problem in the code? Is it the update statement? My connect.php has no error because the previous few fields filled by the admin are being saved. The phone field shows a 0, but the other 3 are empty. Urgent help will be much appreciated. :)
Comment