How would I make a code that dynamicly gets MySQL and makes it like ?UserID=54556 :-/?
$UserID = 54556;
$query = "select * from table where UserId = $UserID";
How would I make a code that dynamicly gets MySQL and makes it like ?UserID=54556 ?
You want to explain a bit more?
Maybe you want
select * from table where UserID like "%something%"
Make your url, e.g.: www.example.com/users.php?id=372687
Pick up the querystring 'id':
$id = mysql_real_escape_string($_GET['id']); $rs = mysql_query("SELECT ... FROM ... WHERE id = '$id'"); ...
Of course with this, you'd want to take two things in to account. First, the variable in double-quotes for the mysql_query() are a bit slower so you may want to do this instead:
$rs = mysql_query("SELECT ... FROM ... WHERE id = '" . $id . "'");
Also, since you are accepted a variable from the user, and throwing it into a SQL query, you'll want to test it for MySQL injection.