php question
I am new to php and am working on a script to show search results. I am getting the following error with this and was wondering if I am doing something wrong or have the wrong version of php on my server because I am copying this code directly from php5 and mysql4 for dummies and have php4 on my server:
<?php
$user = "user";
$host = "localhost";
$password = "pass";
$database = "database";
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$query = "SELECT * FROM `features`";
$result = mysql_query($query)
or die ("Couldn't execute query.");
/* Dsiplay results in a table */
echo "<table cellspacing='10' border=0' cellpadding='0' width='100%'?";
echo "<tr><td colspan='5' align='right'>Click on any picture to see a larger version.<br><hr></td></tr>\n;
while ($row = mysql_fetch_array{result,MYSQL_ASSOC))
{
/* display row for each listingid */
echo "<tr>\n;
echo "<td>{$row['intersection1']}</td>\n";
?>
I get his error:
Parse error: parse error, unexpected '>' in /public_html/pa/index.php on line 26
|