jj20051 Posted July 26, 2008 Share Posted July 26, 2008 Ok... Hw Do You Make It So That PHP Get's THE Id and If The Id Matches One In The Script It Displays That content... Ex: demo.php?id=12345 or Something Like That? Quote Link to comment https://forums.phpfreaks.com/topic/116752-idsomething/ Share on other sites More sharing options...
discomatt Posted July 26, 2008 Share Posted July 26, 2008 $_GET['id'] Quote Link to comment https://forums.phpfreaks.com/topic/116752-idsomething/#findComment-600385 Share on other sites More sharing options...
wildteen88 Posted July 26, 2008 Share Posted July 26, 2008 Use $_GET['id'] to grab if from the url, then use the comparison operator (==) to see if it matches your internal id if(isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $_GET['id']; if($id == '1234') { // match } else { // no match } } else { // invalid id } Quote Link to comment https://forums.phpfreaks.com/topic/116752-idsomething/#findComment-600388 Share on other sites More sharing options...
secoxxx Posted July 26, 2008 Share Posted July 26, 2008 do you want to do this from database queries? Quote Link to comment https://forums.phpfreaks.com/topic/116752-idsomething/#findComment-600392 Share on other sites More sharing options...
jj20051 Posted July 27, 2008 Author Share Posted July 27, 2008 No What They Gave Me Is Fine... Quote Link to comment https://forums.phpfreaks.com/topic/116752-idsomething/#findComment-600618 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.