markduce Posted April 19, 2007 Share Posted April 19, 2007 Hi, I haven't asked for help on here in a long time since I was a wee little noob but am in need at moment! I have a lot of scripts using $_GET variables. However, I have recently moved to a new server with PHP5 on, and this seems to be causing problems, for whenever I use the line to retrieve my get variables I get the following error message : Notice: Undefined index: page in /home/blah/blah/forum.php on line 232 Now on line 32 I have $page=$_GET['page']; I thought this was just a standard use of PHP to get the page that I needed, does anyone have any advice how I can counter these error messages? And I can't turn register globals on by the way, my damn hosts won't let me! Link to comment https://forums.phpfreaks.com/topic/47717-solved-register-globals-affecting-my-_get-variables/ Share on other sites More sharing options...
Guest prozente Posted April 19, 2007 Share Posted April 19, 2007 $page = (isset($_GET['page']) ? $_GET['page'] : false ); Link to comment https://forums.phpfreaks.com/topic/47717-solved-register-globals-affecting-my-_get-variables/#findComment-233047 Share on other sites More sharing options...
bsprogs Posted April 19, 2007 Share Posted April 19, 2007 markduce, is that code you posted line 32 or 232? In the line above it, the error was created from line 232 Link to comment https://forums.phpfreaks.com/topic/47717-solved-register-globals-affecting-my-_get-variables/#findComment-233050 Share on other sites More sharing options...
markduce Posted April 19, 2007 Author Share Posted April 19, 2007 Sorry yes it was line 232, just a typo on my part... Am trying that solution offered, thanks, will let you know how it goes.. Link to comment https://forums.phpfreaks.com/topic/47717-solved-register-globals-affecting-my-_get-variables/#findComment-233059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.