I am a newbie, a real newbie when it’s up to php…
I am building a form which gets information from the database and outputs the information for that specific selection, i have this code here:
$SQL ="SELECT hostess_id FROM hostess WHERE first_name_en="'.addslashes($_GET["titles"]).'"";
?>
But it gives me an error, i mean it’s not correct.
How am i supposed to echo the results of this query?
Thanks
instead of :
do:
result:
NB :
stop writing new code with the ancient
mysql_*functions. They are no longer maintained and community has begun the deprecation process . Instead you should learn about prepared statements and use either PDO or MySQLi. If you cannot decide, this article will help to choose. If you care to learn, here is a quite good PDO-related tutorial