thanks for the info. I inserted your code and the page displayed the following error:
Parse error: parse error, unexpected $ in /.../html/openhouse/adminhouse5.php on line 71
The code now reads:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Open House Admin Page</title>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<body>
<H1>Add an Entry</H1>
<form method="POST" action="adminhouse5.php">
<strong>Area:</strong><br>
<span class="box"> </span>
<select name="area" id="area">
<option>Area 1</option>
<option>Area 2</option>
<option>Area 3</option>
<option>Area 4</option>
<option>Area 5</option>
<option>Area 6</option>
<option>Area 7</option>
<option>Area 8</option>
<option>Area 9</option>
<option>Area 10</option>
<option>Area 11</option>
<option>Area 12</option>
<option>Area 13</option>
<option>Area 14</option>
<option>Area 15</option>
<option>Area 16</option>
<option>Area 17</option>
<option>Area 18</option>
<option>Area 19</option>
<option>Other Area</option>
</select>
<br>
<br>
<b>Address:</b><br>
<input name="address" type="text" id="address" size="100">
<br>
<br>
<b>Details:</b><br>
<input name="details" type="text" id="details" size="100">
<br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
<?php
if ($HTTP_POST_VARS['submit']) {
mysql_connect("db.xxx.com","mxxxn","Mxxxu|");
mysql_select_db("mxxxian_com");
$area=$HTTP_POST_VARS['area'];
$address=$HTTP_POST_VARS['address'];
$details=$HTTP_POST_VARS['details'];
$query ="INSERT INTO openhouse (area,address,details)";
$query.=" VALUES ('$area','$address','$details')";
echo $query;//see if anything is wrong
$result=mysql_query($query);
if ($result) echo "<b>Successfully Posted!</b>";
else echo "<b>ERROR: unable to post.</b>Error is:".mysql_error();
?>
</html>
with "</html>" on line 71...