yellabelly Posted October 24, 2007 Share Posted October 24, 2007 I am trying to verify with an if statement what the page url contains. Please help. Quote Link to comment https://forums.phpfreaks.com/topic/74602-solved-if-statement/ Share on other sites More sharing options...
trq Posted October 24, 2007 Share Posted October 24, 2007 Can you elaberate? Quote Link to comment https://forums.phpfreaks.com/topic/74602-solved-if-statement/#findComment-377053 Share on other sites More sharing options...
yellabelly Posted October 24, 2007 Author Share Posted October 24, 2007 <?php $url_verify= ' what do i put here to call for the url so i can verify if the url contains the word "wave"? '; if (ereg('wave' , $url_verify)) { echo ('choose a thermostat <a href="http://www.linkedurl.com"> click here </a>'); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74602-solved-if-statement/#findComment-377060 Share on other sites More sharing options...
thebadbad Posted October 24, 2007 Share Posted October 24, 2007 $_SERVER['REQUEST_URI'] The URI which was given in order to access this page; for instance, '/index.html'. Quote Link to comment https://forums.phpfreaks.com/topic/74602-solved-if-statement/#findComment-377071 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.