Welcome Guest, Not a member yet? Register   Sign In
GET form causes 404
#1

[eluser]the real rlee[/eluser]
Hi guys, was wondering if someone could help me with this. I have a search form which returns a list of results which i paginate. For this to work I need to send a GET variables from CI, but i keep getting 404 erors.

Here's my form:

Code:
<?=form_open('locations/search', array('method'=>'get', 'onsubmit'=>"if (this.q.value == '') { alert('Please enter a store name, state or postcode'); return false; }"))?>
    <label for="q">postcode, suburb or state</label>
    &lt;input class="field" type="text" id="q" name="q" size="15" maxlength="255"  /&gt;
    &lt;input class="submit" type="submit" value="&gt;>" />
    &lt;?=form_close()?&gt;

My Controller:
Code:
function search ($page = 1, $per_page = 25) {
   die($this->input->get('q')));
}


At the moment then form is submiting to http://dev.mysite.com.au/locations/search?q=forest and i get Error 404...

Anyway any help appreciated Big Grin


Messages In This Thread
GET form causes 404 - by El Forum - 07-15-2007, 08:21 PM
GET form causes 404 - by El Forum - 07-16-2007, 04:16 AM
GET form causes 404 - by El Forum - 07-16-2007, 05:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB