I am new to PHP, I am trying to write a small query function which would would send in one argument for the query such as "LASTNAME".
$sql = "SELECT `user_id`, `first_name`, `last_name`, `age`
WHERE `last_name` = " . $n;
$result = mysql_query($sql);
I am unable to send the argument via function. If I just run a query straight up, I am able to see the information. I would highly appreciate your help on this.
Thanks a lot