$member_id = $_POST['member_id']; $delete = 'yes'; $HOST = 'localhost'; $USERNAME = 'root'; $PASSWORD = ''; $DB = 'hrs'; $link = mysqli_connect($HOST, $USERNAME, $PASSWORD, $DB); $query = "UPDATE member SET delete='$delete' WHERE member_id='$member_id'"; echo $query; $result = mysqli_query($link, $query) or die(mysqli_error($link));
Any error in my query? it says 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 'delete='yes',member_type='none' WHERE member_id='19'' at line 1
However, This method i uses in other page is has no problem I have no idea what is the error, since everything is the same.
$query = "UPDATE members SET block='$active', role='$role' WHERE id='$id'";
your help is appreciated
Edited by qwertpink: n/a