- Joined
- Feb 19, 2010
- Messages
- 158
- Reaction score
- 174
Offline
I am getting the error "Undefined index: search". I know it has to do with search being the wrong variable being passed from the form but I'm not sure what is suppose to be passed and I've tried everything. Could some help me out?
I've placed stars where some vowels would go to prevent it from posting a text box.
Code posted below:
<!--<form action='custSearch.php' method='post'>
<input type='text' name='search' />
<input type='submit' value='search' />
<input type='hidden' name='do' value ='value' />
</form>";--> <f*rm acti*n='custSearch.php' meth*d='p*st'>
<inp*t type='t*xt' name='se*rch' />
<inp*t type='subm*t' val*e='search' />
<inp*t type='hidd*n' n*me='d*' val*e ='val*e' />
</f*rm>";
$value = $_POST['search'];
if (isset($_POST['do']) && $_POST['do'] == 'value')
{
//checking to see if field is empty then proceeding with search query
if (empty($value))
{
echo "You left search field blank.";
}
else
I've placed stars where some vowels would go to prevent it from posting a text box.
Code posted below:
<!--<form action='custSearch.php' method='post'>
<input type='text' name='search' />
<input type='submit' value='search' />
<input type='hidden' name='do' value ='value' />
</form>";--> <f*rm acti*n='custSearch.php' meth*d='p*st'>
<inp*t type='t*xt' name='se*rch' />
<inp*t type='subm*t' val*e='search' />
<inp*t type='hidd*n' n*me='d*' val*e ='val*e' />
</f*rm>";
$value = $_POST['search'];
if (isset($_POST['do']) && $_POST['do'] == 'value')
{
//checking to see if field is empty then proceeding with search query
if (empty($value))
{
echo "You left search field blank.";
}
else