you can simply use $_GET['id'] if you have it in your URL address. You can do this too: $url = 'info.php?id=24&c=2' $matchess = preg_match("#id=(.*?)&#is",$url,$matches); $id = $matches[1]; PHP: (I wrote that in 1 minute so I'm sorry if it's not working like you want)
GET is not what I am looking for, because $url is not the url of the page. BUT thanks, the second code is exactly what I am looking for.