CI Problem with form validation |
An undefined variable error message, simply tells you that the variable you are trying to use is undefined!
You've done something like this PHP Code: if (something_that_might_happen === TRUE) So $message ONLY Exists - ie is defined if your IF statement is TRUE... When it's not, $message does not exist! So you need to ensure that if you are going to use a variable anywhere, that it has to be SET to something! PHP Code: $message = ''; or PHP Code: if ($something_that_might_happen === TRUE) And then you'd ask - Where does $something_that_might_happen get set? PHP Code: if (isset($something_that_might_happen) AND $something_that_might_happen === TRUE) And if you are using $_POST or _GET and any array and using those to test or display. Do they exist? So really it's a matter of - "Oh I get an undefined variable or index or whatever.. Is it defined when it's being used?" Hope that helps you fix your issue! |
Messages In This Thread |
CI Problem with form validation - by FlevasGR - 10-29-2014, 12:25 PM
RE: CI Problem with form validation - by ciadmin - 10-29-2014, 08:40 PM
RE: CI Problem with form validation - by FlevasGR - 10-30-2014, 04:33 AM
RE: CI Problem with form validation - by Narf - 10-31-2014, 11:49 AM
RE: CI Problem with form validation - by Tim Brownlaw - 10-29-2014, 11:30 PM
RE: CI Problem with form validation - by Avenirer - 10-30-2014, 05:56 AM
RE: CI Problem with form validation - by Avenirer - 10-30-2014, 06:12 AM
RE: CI Problem with form validation - by ivantcholakov - 10-31-2014, 10:00 PM
|