AshleyQuick Posted February 22, 2009 Share Posted February 22, 2009 <?php if($_SERVER["PHP_SELF"] == '/products/expitem.php') { ?> <?php ?> Content <?php } ?> The above has always worked fine but I need this to be changed because there are now query strings attached. expitem.php?cmd=exp&id=item01 expitem.php?cmd=exp&id=item02 etc.. --- expitem.php?cmd=exp&id= will remain the same but the string on the end (item...) will be now be dynamic. How can the code above "disregard" what's on the end and display the content? Quote Link to comment Share on other sites More sharing options...
Cal Posted February 22, 2009 Share Posted February 22, 2009 Try this... if($_SERVER["SCRIPT_NAME"] == '/products/expitem.php') { It should work even with $_GET variables. Quote Link to comment Share on other sites More sharing options...
AshleyQuick Posted February 22, 2009 Author Share Posted February 22, 2009 SWEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET, thank you! Quote Link to comment 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.