how do I execute an SQL query in PHP

StanleyDev

Member
Nov 13, 2011
35
0
so i was wondering if someone could make a php code to run an SQL query when the user clicks a button. I have written the sql query in php already i just have no clue how to excute it, also could someone tell me if this php code works? :

PHP:
 $Suser = ('"/userme.php"');
^^^^^^^^^ this code is to check that page for the user's username to use within this sql query:

Code:
$id = mysql_query ("SELECT $Suser FROM users;");

^^^^^^^^ will this work?
 

Users who are viewing this thread

Top