does this look as if it would be valid? if not am i heading in the right direction?
<html>
<head>
</head>
<body>
<form action=$PHP_SELF method=post>
first name: <input type=text name=firstname> <br />
last name: <input type=text name=lastname> <br />
home phone : <input type=text name=homephone> <br />
email : <input type=text name=email> <br />
<input type=submit name=submit>
</form>
</body>
</html>
<?
$query = "SELECT * FROM customerinfo";
IF(isset($POST['firstname']))
{
$query .="WHERE firstname like '%".$POST['firstname']."%'";
}
IF(isset($POST['lastname']))
{
$query .="WHERE lastname like '%".$POST['lastname']."%'";
}
IF(isset($POST['homephone']))
{
$query .="WHERE lastname like '%".$POST['homephone']."%'";
}
IF(isset($POST['email']))
{
$query .="WHERE lastname like '%".$POST['email']."%'";
}
$qry = mysql_query($query);
$get_data = mysql_fetch_array($qry);
?>
<html>
<body>
<frame>
<table>
<tr><td>
<? php print {$_POST['firstname']}; ?>
</td><td>
<? php print {$_POST['lastname']}; ?>
</td><td>
<? php print {$_POST['homephone']}; ?>
</td><td>
<? php print {$_POST['email']}; ?>
</td></tr>
</frame>
</body>
</html>