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 '' at line 1
The query works but the error report "bugs" me :)
//the vars i use
$pos = $_POST['positie']; //this can be B1 till M100
$kolom = $pos[0]; //get first char of the $pos string
$rij = substr($pos, 1, 3); //get the rest of the chars
$sql= mysql_query("UPDATE floorplan SET available='0' WHERE kolom='$kolom' AND rij='$rij'") or die( mysql_error() );
the kolom is varchar(4), rij is int(4) and avaiable is a BOOLEAN.
"; echo "kolom = ". $kol ." and rij = ". $rij."
";` – TrustMe Nov 19 '12 at 13:21