Hi guys, newbie alert in desperate need of help!
I'm trying to get a PHP script to check that a few fields entered by a user matches against the details in the database.
All is well when the field Grid is set to an INT in the database (the script executes and moves on to the next stage), but I want the user to be able to enter a VARCHAR (or CHAR) for this value as it relates to a grid reference…for instance I want them to enter A4.
When I change the database to store this field as a VARCHAR I get the message Unknown column 'A4' in 'where clause' when execute the script.
Does anybody have any ideas what I need to change?
Here's the query -
$query_Recordset1 = "SELECT * FROM tblclients
WHERE UniqueID = " . $_POST['uniqueid'] .
" AND Grid = " . $_POST['gridref'] .
" AND Question1 = " . $_POST['questionone'] .
" AND Question2 = " . $_POST['questiontwo'] .
" AND Question3 = " . $_POST['questionthree'] ;
Thanks for you help!