mcmuney Posted April 19, 2007 Share Posted April 19, 2007 I was using the line below, which was working prior to upgrading my PHP to 5, now it doesn't work. What's the fix for in on PHP5? $mail->mailParam["sci_id"]=$_GET[$sci_id]; Link to comment https://forums.phpfreaks.com/topic/47672-_get-problem-in-php5/ Share on other sites More sharing options...
trq Posted April 19, 2007 Share Posted April 19, 2007 That is valid code. Whats the problem? Link to comment https://forums.phpfreaks.com/topic/47672-_get-problem-in-php5/#findComment-232794 Share on other sites More sharing options...
mcmuney Posted April 19, 2007 Author Share Posted April 19, 2007 The $_GET function is basically not working. Where it would normally pull the $sci_id, it now shows (sci_id=blank). I'm having the same issue with other lines with $_GET, I assumed it had something to do with PHP5, because it works with PHP4.4. Link to comment https://forums.phpfreaks.com/topic/47672-_get-problem-in-php5/#findComment-232795 Share on other sites More sharing options...
btherl Posted April 19, 2007 Share Posted April 19, 2007 Can you post your entire script? $_GET works the same way in php5, so the problem is most likely somewhere else. Link to comment https://forums.phpfreaks.com/topic/47672-_get-problem-in-php5/#findComment-232828 Share on other sites More sharing options...
btherl Posted April 19, 2007 Share Posted April 19, 2007 Hmm.. was $sci_id set before you used it in that line? If it was not set anywhere, then you had register_globals on in php4, but off in php5. You can fix that by switching it on in php.ini, or by using $_GET['sci_id'] instead of $sci_id, giving you $sci_id = $_GET['sci_id']; $mail->mailParam["sci_id"]=$_GET[$sci_id]; Link to comment https://forums.phpfreaks.com/topic/47672-_get-problem-in-php5/#findComment-232841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.