darknessmdk Posted August 5, 2007 Share Posted August 5, 2007 ok up until now I've used php4 I just created a site and am using php5 server... now some of my commands are broken if(isset($HTTP_POST_VARS) doesnt work and my method of passing a variable through a url doesn't work also... ?id=1 anyone know what the fixes are? Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/ Share on other sites More sharing options...
trq Posted August 5, 2007 Share Posted August 5, 2007 Nothing to do with php5, register_long_vars and register_globals have been off by default for quite some time (4 and 5). Use, $_POST, $_GET, $_SESSION and $_COOKIE instead. Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316250 Share on other sites More sharing options...
Barand Posted August 5, 2007 Share Posted August 5, 2007 Exactly, HTTP_POST_VARS was deprecated way before PHP5 came on the scene. Use $_POST. ?id=1 shouldn't have changed $id = $_GET['id']; Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316253 Share on other sites More sharing options...
Utech22 Posted August 5, 2007 Share Posted August 5, 2007 Update your self here: http://www.php.net/manual/en/ Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316257 Share on other sites More sharing options...
darknessmdk Posted August 5, 2007 Author Share Posted August 5, 2007 thats really odd, HTTP_POST_VARS has always worked for me with godaddy, i know its php4, but I changed it to $_POST, and it worked Thanks! I'm using hostmysite right now, to pass variables through a url link I used this ?tid=$row[tid] and it comes up in the url address but my sql statement doens't us it... <?PHP $result = mysql_query("SELECT * FROM training WHERE tid = '$tid'"); $row = mysql_fetch_array($result); ?> Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316265 Share on other sites More sharing options...
Barand Posted August 5, 2007 Share Posted August 5, 2007 Have you opened the manual since php3 ? http://us2.php.net/manual/en/security.globals.php Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316271 Share on other sites More sharing options...
darknessmdk Posted August 5, 2007 Author Share Posted August 5, 2007 well I learned some php in school... and I am realizing my teacher didnt know very much. some of the techniques I still use are from school. I guess I need to start reading more. Thanks thorpe and Barand for the help Link to comment https://forums.phpfreaks.com/topic/63464-solved-issues-with-php5/#findComment-316278 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.