oldschr Posted July 5, 2007 Share Posted July 5, 2007 This Function works perfectly in PHP 4, but with 5 it is throwing back errors. If you need the whole code let me know. The <?PHP and /php?> are just for you to see I am using PHP, I only use <? and ?> Here is the function call $postarray = makemyarray($HTTP_POST_VARS); <?PHP function makemyarray($form_vars) { foreach ($form_vars as $key => $value) { if ($key == "pagecount"){} elseif ($key == "password"){} elseif ($key == "name") { $blankfield["userid"] = strtolower($value); } elseif ($key == "Count"){} else { $blankfield["$key"] = $value; } } return $blankfield; } /PHP?> Quote Link to comment Share on other sites More sharing options...
AbydosGater Posted July 5, 2007 Share Posted July 5, 2007 What error is it giving for PHP5? Quote Link to comment Share on other sites More sharing options...
oldschr Posted July 5, 2007 Author Share Posted July 5, 2007 I guess that would of helped....sorry. Also I did try to use the CODE function. Warning: Invalid argument supplied for foreach() in ../htdocs/cahs/eval/faculty05.php on line 39 Warning: Invalid argument supplied for foreach() in ../htdocs/cahs/eval/faculty05.php on line 526 Quote Link to comment Share on other sites More sharing options...
oldschr Posted July 5, 2007 Author Share Posted July 5, 2007 grrrrrr for stupid questions. The problem was I was using the old $HTTP_POST_VARS instead of the new $_POST Sorry for wasting your time reading this...... Quote Link to comment Share on other sites More sharing options...
AbydosGater Posted July 5, 2007 Share Posted July 5, 2007 No Problem, And its not wasting anyones time. People are here to be helped and get help. Reading posts is what people do Andy 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.