Hi, ok, i have one databse, with one table with one field "email" and table is called "staff". All i want to do is search the database from a text field and is the POST is found in the databse then...display it. This si waht i have but it will NOT show the result???
<?php
mysql_connect("localhost","web12_database","ps3");
mysql_select_db("web12_database");
$search=$_POST["search"];
$result = mysql_query("SELECT * FROM staff LIKE '%$search%'");
if ( ! $result) {
echo "<br> email : $result";
// to check the POST is coming threw
echo "<br> email : $search";
}
?>
Anyone know why?
Thanks
Andy