Welcome Guest, Not a member yet? Register   Sign In
Search Criteria Ignored, Only Redirects to Else Statement
#12

(This post was last modified: 06-13-2019, 02:30 PM by jreklund.)

We needed to see what you got into your controller, to see where the problem where in the first place. As you didn't get any information from it, we can fix the controller or the view.

Your searchform output are this:
<input type="submit" name="" value="submit" class="button">

Login form:
<input type="submit" name="submit" value="Login"/>

As you can see the name="" field are empty, and that's why your $this->input->post('post') never validated.

If you want your old code, use this instead in your view.
echo form_submit('submit', 'submit', 'class="button"');

___________________EDIT______________________

Hold on a second... I can't even see how you got the following:
<input type="submit" name="" value="submit" class="button">

With your provided code you should have:
<input type="submit" name="submit" value="" class="button">

But none the less, your field are empty. And an empty value can't be matches as true in an if statement. You can reverse it with ! in case you want an empty button.

___________________EDIT2______________________

Or match it with an empty string. if($this->input->post('submit') === '') {
Reply


Messages In This Thread
RE: Search Criteria Ignored, Only Redirects to Else Statement - by jreklund - 06-13-2019, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB