OK, thanks I'm new at this
The error is:
You have an error in your SQL syntax near 'LIKE '%dd%' LIMIT 0, 30 ' at line 1
Warning: Supplied argument is not a valid MySQL result resource in /home/sites/home/web/resulttest.php on line 17
Warning: Supplied argument is not a valid MySQL result resource in /home/sites/home/web/resulttest.php on line 21
When I do the form search of :
<?
$hostname = "localhost"; // Usually localhost.
$username = "dweibel"; // If you have no username, leave this space empty.
$password = "aysecy72"; // The same applies here.
$usertable = "arona"; // This is the table you made.
$dbName = "arona"; // 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");
?>
<?
//error message (not found message)
$XX = "No Record Found";
// Performing SQL query from a form called test
$query = mysql_query("SELECT * FROM $dbName WHERE $test LIKE '%$search%' LIMIT 0, 30 "); echo mysql_error();
while ($row = mysql_fetch_array($query))
// Printing results in HTML
print "<table>\n";
while ($row = mysql_fetch_array($query)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
//below this is the function for no record!!
//end
?>
If sombody can tell me why it doesn't work
Tanks
Dan