GroundZeroStudio Posted March 4, 2007 Share Posted March 4, 2007 { $required = array ('newname' , 'newpass' , 'verpass' , 'email' , 'veremail' , 'country'); //LIST OF FIELDS NOT REQUIRED } case "new": foreach($_POST as $field => $value) { if (in_array($field, $required)) //LINE 79 { if ($value == "") { unset($_GET['do']); $message_new = "A Required field entry is missing. Please try again. The Missing Field is $field"; include("login_form.html"); exit(); } } ERROR! Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/.mccoy/wamboldt/ictonentertainment.com/wamboldt/login.php on line 79 i put a comment on line 79. That is the right datatype so what is wrong? Quote Link to comment Share on other sites More sharing options...
simcoweb Posted March 4, 2007 Share Posted March 4, 2007 You're declaring a 'case' which is part of a 'switch' function but no 'switch' is declared. case "new": Quote Link to comment Share on other sites More sharing options...
GroundZeroStudio Posted March 4, 2007 Author Share Posted March 4, 2007 dude, switch is defined. I have a couple hundred lines of code and didnt want to post them all Quote Link to comment Share on other sites More sharing options...
Orio Posted March 4, 2007 Share Posted March 4, 2007 I see that you are defining $required as an array inside a block: { $required = array ('newname' , 'newpass' , 'verpass' , 'email' , 'veremail' , 'country'); //LIST OF FIELDS NOT REQUIRED } Is that an "if"? Because if it is, it's probably not entering the block (this condition is false) and that's why $required is not being defined. You need to either make sure that if gets executed all the time, or define $required within the "new" case (or before of it- whats important is that it will be defined). Orio. 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.