Posted by:
stevenmartin99
(---.b-ras1.blp.dublin.eircom.net)
if (isset($_POST['$field1'])) {
$column_to_search= 'name';
}
if (isset($_POST['$field2'])) {
$column_to_search= 'postcode';
}
your probably best to make the form 1 input and 2 radio buttons (name and postcode)
so that they cant search both at same time which would cause issues with the above script
then ud use
if ($_POST['radiobutton']=='name')
{
$column_to_search= 'name';
$searchvalue=$_POST['inputbox'];
}
else
{
$column_to_search= 'postcode';
$searchvalue=$_POST['$inputbox'];
}
Steven Martin
stevenmartin99@gmail.comstevenmartin99@hotmail.comPampServer.com - [
pampserver.com]
Edited 1 time(s). Last edit at 02/15/2009 12:20PM by stevenmartin99.