Okay I have an html with the following search criteria, a simple select query.
<form action="results.php" method = "post">
Choose page name
<select name = "page_name1">
<option value="home_page">home page
<option value="Vieux_Carre_page"> Vieux Carre
<option value="Etruria_page"> Etruria
<option value="Attia_page"> Attia
<option value="About_page"> About Eli Jewels
<otption value="Where_to_buy_page"> Where to Buy
<option value="Contact_page"> Contact
</select>
<input type=submit value="Search">
then on the results page starting on line 1
I have the following
<html>
<head>
<title> :: Eli Jewels update form ::</title>
</head>
<body>
<h1> Search Results</h1>
<?
$page_name = addslashes($page_name);
@ db = mysql_pconnect("localhost", "dbname", "password");
if (!db)
{
echo "Error: could not connect to Database. Please try again later.";
exit;
}
mysql_select_db_("a0017855");
$query = "select * from Eli
where $page_name1=$page_name;
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p> Number of pages found: ".$num_results."</p>";<?
$page_name = addslashes($page_name);
@ db = mysql_pconnect("localhost", "a0017855", "snuren34");
if (!db)
{
echo "Error: could not connect to Database. Please try again later.";
exit;
}
mysql_select_db_("a0017855");
$query = "select * from Eli
where page_name=$page_name;
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p> Number of pages found: ".$num_results."</p>";
?>
But I am getting the following error message
Parse error: parse error in /usr/home/web/users/a0017855/html/eli/admin/results.php on line 8
I don't see what I am doing wrong.
Please help