Hi everybody
I hope somebody can help me. I'm desperate after a solution.
My script is:
<?
$hostname = "localhost"; // Usually localhost.
$username = ""; // If you have no username, leave this space empty.
$password = ""; // The same applies here.
$usertable = ""; // This is the table you made.
$dbName = ""; // This is the main database you connect to.
$fieldname = "keyword"; //This are the fieldname of the database
MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database");
@mysql_select_db( "$dbName") or die( "Unable to select database");
?>
<?
//Query
$query = mysql_query("SELECT * FROM $dbName WHERE $fieldname LIKE '%$search%' LIMIT 0, 30 "); echo mysql_error();
if (!$query) {
echo("<P>Error performing query: " .
mysql_error() . "</P>"); exit(); }
// Display the text of each joke in a paragraph
while ( $row = mysql_fetch_array($query) ) {
<pre>
echo "<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<p> $row["id"] </p>
</tr>)
</table>";
</pre>
}
//end
?>
and the error message is:
Parse error: parse error in /home/sites/home/web/result.php on line 24
This is my echo script
Thanks in advance for your help.
Dan