<?php
$hostname = "localhost"; // Usually localhost.
$username = "root"; // If you have no username, leave this space empty.
$password = "mypassword"; // The same applies here.
$usertable = "search"; // This is the table you made.
$dbName = "site"; // This is the main database you connect to.
MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database");
@mysql_select_db( "$dbName") or die( "Unable to select database");
?>
<?
$sql = mysql_query("SELECT * FROM $usertable WHERE $Metode LIKE %$search% LIMIT 0, 30 ");
$XX = "No Record Found";
$result = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
$variable1=$row["URL"];
$variable2=$row["SITE_TITLE"];
$variable3=$row["SITE_DESC"];
print ($variable2);
print ($variable1);
print ($variable3);
}
if (!$variable1)
{
print ("$XX");
}
//end
?>
I cannot get this to work Plz Help 🙂 :o :?