php - codeigniter - form returning no data -


i'm trying create page form using ci. when submit form, controller says have no data that's been submitted. can't see error lies.

here's view:

<?php echo validation_errors(); ?> <?php echo form_open('widgets/search/'.$hardwaremodel.'/'.$objectid.'/'.$name.'/'.$fd); ?> <div class="form-group">     <label for="search">last 4 characters of address:</label>     <input type="text" class="form-control" id="searchstring" placeholder="last 4 characters" size="4"> </div>            <button type="submit" class="btn btn-default">search</button>  <button type="cancel" class="btn btn-default">cancel</button> </form> 

once page renders, form tag ends looking this:

<form action="http://myserver/myciapp/index.php/widgets/search/205406zl/5461/sw-1/sw1net" method="post" accept-charset="utf-8">  

the controller:

public function search() {     $searchstring = $this->input->post(); // form data     var_dump($searchstring);     exit;     } 

the results of var_dump shows:

bool(false) 

thanks

edit 1

i haven't posted entire html page includes form... display of fields passed in uri headings on page - before create form. hope clarifies... impact post data? why relevant?
thanks

form elements referenced name attribute missiong on input field searchstring.

add:

name="searchstring"  

on input field.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -