Welcome Guest, Not a member yet? Register   Sign In
Need help in form post

<form name="frmsearch" action="index.php/search" method="post">
&lt;input type="text" id="keyword" name="keyword" value="&lt;?php echo @$keyword ?&gt;" /&gt;
&lt;input type="submit" name="btnSubmit" class="go" value="" /&gt;
&lt;input type="hidden" name="post" value="true" /&gt;

When submitted above .. CI don't retrieve form values. Gives error message
Severity: Notice
Message: Undefined index: keyword

Please help...its really urgent.


This looks like a view...

Does the controller that loads it include data?

// controller code
$data['keyword'] = 'somevalue';
$this->load('form', $data);

CI is complaining that $keyword hasn't been set.

Thanks for reply...

But some how my problem got fixed.
In form tag, I replaced &lt;?php echo site_url();?&gt; by &lt;?php base_url();?&gt; ..
and suddenly I got post values entered in form text field.

Not sure if this is correct or wrong.... Wink

Theme © iAndrew 2016 - Forum software by © MyBB