Oikofugic Posted December 30, 2019 Share Posted December 30, 2019 Hi I have used in the past search.php?sl=y on a link to the page, and in the page I would use if($_GET[$sl]=='y'){ Show somw stuff here } This was good in php 5.6, but I'm in the process of upgrading my code to the newer version, and am looking for an updated way to acheive this. Help, pointers examples Thanks in advance. Paul Quote Link to comment https://forums.phpfreaks.com/topic/309766-if-_get-in-php-version-72/ Share on other sites More sharing options...
requinix Posted December 30, 2019 Share Posted December 30, 2019 That isn't quite the code you used. $_GET["sl"] still works, but you should test if that value exists with isset() first before trying to get it. Quote Link to comment https://forums.phpfreaks.com/topic/309766-if-_get-in-php-version-72/#findComment-1572983 Share on other sites More sharing options...
Oikofugic Posted December 31, 2019 Author Share Posted December 31, 2019 Thank you, will try that. Quote Link to comment https://forums.phpfreaks.com/topic/309766-if-_get-in-php-version-72/#findComment-1572985 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.