include("config.php");
include("$header");
if ($_POST['action']=="select"){ ?>
Results
if ($quote == "")
{$quote = '%';}
if ($author == "")
{$author = '%';}
if ($name == "")
{$name = '%';}
if ($email == "")
{$email = '%';}
if ($url == "")
{$url = '%';}
$result = mysql_query ("SELECT * FROM $table WHERE quote LIKE '%$quote%' AND author LIKE '%$author%' AND name LIKE '%$name%' AND email LIKE '%$email%' AND url LIKE '%$url%'");
if ($row = mysql_fetch_array($result)) {
do {
$complem=$row["complem"];
$url=$row["url"];
$email=$row["email"];
$name=$row["name"];
?>
=$row["quote"]?>
Horse ID Number: =$row["quoteID"]?>
Played by =$row["author"]?>
if ($complem !=""){ ?>
=$complem?>
}
if ($url !=""){ ?>
Information submitted by =$name?>
} elseif ($email !=""){ ?>
Information submitted by
} elseif ($name !=""){ ?>
Information submitted by =$name?>
} else { ?>
}
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found! Please press the back button on your browser to try again.
Tip: you don't have to fill in all the fields. Filling in just one or two will return all quotes with that information, it works like a search form. :)
";}
}
else { ?>
Search for a Name
} ?>
include("$footer");
?>