sphinx Posted January 30, 2013 Share Posted January 30, 2013 Hi. I used to have the code for this, but i cant backtrack on my previous posts. What can I use to do the following: http://website.com/index.php?error to Display error content on page http://website.com/index.php?welcome To display welcome content on page Thanks Link to comment https://forums.phpfreaks.com/topic/273844-content-based-on-url-same-file/ Share on other sites More sharing options...
Jessica Posted January 30, 2013 Share Posted January 30, 2013 if(isset($_GET['error'])){...} Link to comment https://forums.phpfreaks.com/topic/273844-content-based-on-url-same-file/#findComment-1409237 Share on other sites More sharing options...
requinix Posted January 30, 2013 Share Posted January 30, 2013 Look at the $_SERVER["QUERY_STRING"]. [edit] Jessica's is better. Even though it's missing the equals sign using ?error is treated just like ?error=: $_GET["error"] == "". Link to comment https://forums.phpfreaks.com/topic/273844-content-based-on-url-same-file/#findComment-1409240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.