URL trang web:
http://www.example.com/?id=2
Mã:
$id = intval($_GET['id']);
$results = mysql_query("SELECT * FROM next WHERE id=$id");
while ($row = mysql_fetch_array($results))
{
$url = $row['url'];
echo $url; //Outputs: 2
}