code to paste:
<?php
//* put php code to connect database* //
// We preform a bit of filtering
$search = strtoupper($search);
$search = strip_tags($search);
$search = trim ($search);
//Now we search for our search term, in the field the user specified
$data = mysql_query("SELECT * FROM personal WHERE upper($lastname) LIKE'%$search%'");
//And we display the results
while($result = mysql_fetch_array( $data ))
{
echo $result['lastname'];
echo " ";
echo $result['firstname'];
echo "<br>";
echo $result['mi'];
echo "<br>";
echo "<br>";
echo $result['age'];
echo "<br>";
echo "<br>";
}
?>
No comments:
Post a Comment