[eluser]fireproofsocks[/eluser]
I'm new to CI... I got basic pages working per Derek's great video tutorials, but I'm having trouble processing a form. It's a basic search form where user types in a word, then I perform a SQL query fetching rows based on that word. However, I can't seem to read any data from the $_POST array... I've tried using both $_POST, $_REQUEST, and I've tried using CI's
My form looks like this:
Code:
<?php echo form_open('search/results'); ?>
<p>
<label for="searchterms">Search Terms: </label>
<input type="text" id="searchterms">
<input type="submit" value="Search">
</p>
</form>
And then my search.php's "results" function looks like this:
Code:
function results() {
$searchterms = $this->input->post('searchterms');
// $searchterms = $_POST['searchterms'];
// $searchterms = $_REQUEST['searchterms'];
echo "Search terms were:<br/>";
echo $searchterms;
}
Nothing ever makes it through, though... what am I missing?