Welcome Guest, Not a member yet? Register   Sign In
Continuous Loop in form validation
#6

[eluser]Twisted1919[/eluser]
[quote author="Nick_MyShuitings" date="1294381432"]I don't have to much time to read or test all of that... but you have an error here:

Code:
if ($kunstwerk = $this->input->post('kunstwerk'))

You would want this I think:

Code:
if ($kunstwerk == $this->input->post('kunstwerk'))
[/quote]

Code:
if ($kunstwerk = $this->input->post('kunstwerk'))
This is correct, however, the post() method return false if the $_POST key is not set, so it is better to do something like :
Code:
$kunstwerk = $this->input->post('kunstwerk');
if(!empty($kunstwerk))
{
//because $kunstwerk may be set but also it can be empty, and you don't want this.
[...]
}

Just as a sidenote
Code:
if ($kunstwerk == $this->input->post('kunstwerk'))
always validates to true, so be careful.


Messages In This Thread
Continuous Loop in form validation - by El Forum - 01-06-2011, 05:17 PM
Continuous Loop in form validation - by El Forum - 01-06-2011, 06:23 PM
Continuous Loop in form validation - by El Forum - 01-06-2011, 07:00 PM
Continuous Loop in form validation - by El Forum - 01-06-2011, 07:17 PM
Continuous Loop in form validation - by El Forum - 01-06-2011, 11:26 PM
Continuous Loop in form validation - by El Forum - 01-07-2011, 04:12 AM
Continuous Loop in form validation - by El Forum - 01-07-2011, 05:01 AM
Continuous Loop in form validation - by El Forum - 01-07-2011, 08:50 AM
Continuous Loop in form validation - by El Forum - 01-07-2011, 09:02 AM
Continuous Loop in form validation - by El Forum - 01-07-2011, 11:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB