Thanks for the response and suggestions ixalmida. I did check that the <form> tag was closed and it wasn't. I fixed that but still have the problem. I also removed 'this' and didn't fix it either. The strange thing is that sometimes it work fine in IE and sometimes I get the expired page message. In Firefox, it works all the time.
Here's the entire page (the html part at the top was generated automatically using a visual tool):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Italian Physicians USA</title>
<style type="text/css" media="screen">
html, body { margin: 0; padding: 0; }
body { color: #333; font: 12px Helvetica, Arial, sans-serif; line-height: 18px; }
h2 { color: #333; }
a { color: #337810; }
p { margin: 0 0 18px; }
#wrapper { float: right; width: 100%; margin-left: -460px; }
/* Header */
#header { border-bottom: 2px solid #ddd; }
#header h1 { border color: #004b6f; margin: 0 0 3px; padding: 24px 18px 0; }
#header p { color: #666; font-size: 11px; font-weight: bold; padding: 0 18px; }
/* Content Style */
#navigation { border-bottom: 1px solid #ccc; margin-left: 18px; }
#navigation ul { padding: 0 18px 9px; }
#content { padding-left: 18px; }
#extra { border-bottom: 1px solid #ccc; }
#extra small { font-size: 11px; line-height: 18px; }
#content p, #extra p { padding-right: 18px; }
/* Content Positioning & Size */
#navigation { float: left; width: 200px; }
#content { margin: 0 0 36px 460px; }
#extra { float: right; width: 200px; } /* Footer */
#footer { background: #333; border-bottom: 2px solid #999; clear: both; width: 100%; }
#footer a { color: #eee; }
#footer p { color: #ccc; margin: 0; padding: 0 18px 10px; }
#footer ul { border-bottom: 1px solid #555; list-style: none; margin: 0 18px 6px; padding: 10px 0 6px; }
#footer li { display: inline; font-size: 11px; font-weight: bold; padding-right: 5px; }
</style>
<!--[if IE]>
<style type="text/css">
#navigation, #content, #extra { margin-top: 20px; }
</style>
<![endif]-->
</head><body>
<div id="container">
<div id="header" align="center">
<table border="1" cellpadding="0" cellspacing="0" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 804px; BORDER-COLLAPSE: collapse; HEIGHT: 111px; BORDER-RIGHT-WIDTH: 0px" bordercolor="#111111" width="804" id="AutoNumber6" height="111">
<tr>
<td width="741" height="100" bordercolor="#000000" background="../italy_top.jpg" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" align="left">
<p align="center"><img style="WIDTH: 761px; HEIGHT: 115px" height="96"
hspace=0 src="Italy_top_pictures.JPG" width=635
border=0></p>
</td>
</tr>
</table><font color="#000080" >
<p class="description">
<br><font color="#008000" size="5">
Italian Physicians </font> </font> Find Physicians who Speak Italian </p>
<div id="footer" style="WIDTH: 100%; HEIGHT: 40px">
<ul>
<li><a href="index.html"><font face="Tahoma" size="2">Home</font> </a>
<font face="Tahoma" size="2" color="#ffffff"><a
href="find_a_physician.php">Find an Italian
Physician</a></font> <a
href="find_a_hospital.php"><font
face=Tahoma size=2>Find a Hospital</font>
</a>
<font color="#ffffff"
<font face="Tahoma" size="2"> </font> <a
href="http://www.ambwashingtondc.esteri.it/ambasciata_washington" target="_blank"><font face="Tahoma" size="2">Embassy of Italy</font>
</a><font
face=Tahoma size=2> </font>
<a
href="consulates.html"><font face="Tahoma"
size=2>Designated Physician Consulates</font> </a>
<a
href="email_contact.php"><font face="Tahoma"
size=2> Contact Us</font> </a><font face="Tahoma" size="2">
</font>
</font></li>
</ul>
</div>
</div><font face="Arial" color="#000000" size="2">
<div>
<div></ div></div></font><br></div></div>
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post">
<?php
$link = mysql_connect('server.com', 'user', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
/print 'Connected successfully';/
mysql_select_db(it_phys);
$sql = "SELECT distinct(state) FROM hospitals ORDER BY state";
$rs = mysql_query($sql)or die("Connection to DataBase failed");
print ("<div align=center>");
print("<font color='#008000' size='2' face='Tahoma'><b>Find a Hospital</b></font><br><br>");
print ("Select a State<br>");
print ("<SELECT name=State onchange='form.submit();'>");
print("<OPTION value='none' selected></OPTION>\n");
print("<OPTION value='All'>All</OPTION>\n");
for($i = 0; $i < mysql_num_rows( $rs ); $i++)
{
$tmp = mysql_fetch_row( $rs );
print("<OPTION value=\"$tmp[0]\">$tmp[0]</OPTION>\n");
}
print ("</SELECT>");
print ("</div>");
mysql_free_result($rs);
mysql_close($link);
?>
<?php
if(isset($POST['State']))
{
print "<div align=center><br><br>";
print "State Selected: ".$POST['State'];
print "<br><br></div>";
/ run query to pull members based on state /
$link = mysql_connect('server.com', 'user', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
/print 'Connected successfully';/
mysql_select_db(it_phys);
if($POST['State']=="All")
{
$query = "SELECT
hospitals.Hospital Name, hospitals.Address1,
concat(rtrim(hospitals.City),', ',rtrim(upper(hospitals.State)), ' ', hospitals.zip) as City_State,
hospitals.state,hospitals.Phone Number,hospitals.Hospital Type,hospitals.Emergency Service,
hospitals.map
FROM hospitals
ORDER by Hospital Name";
}else{
$query = "SELECT
hospitals.Hospital Name, hospitals.Address1,
concat(rtrim(hospitals.City),', ',rtrim(upper(hospitals.State)), ' ', hospitals.zip) as City_State,
hospitals.state,hospitals.Phone Number,hospitals.Hospital Type,hospitals.Emergency Service,
hospitals.map
FROM hospitals WHERE hospitals.state='".$POST['State']."' ORDER by hospitals.Hospital Name";
}
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
/ show in table /
// Printing results in HTML
print "<style>
h2 { border-bottom: 3px solid red; }
table { border-bottom: 1px solid blue; align='left'; cellpadding=0; cellspacing=0 }
td {border-bottom: 0px outset black; cellpadding=0 }
</style>";
print "<div align=center>";
print "<table cellpadding='20'>";
$i=0;
$rows=mysql_num_rows($result);
while($i < $rows) {
print "<tr>";
print "<style>
td {border-bottom: none; }
</style>";
print "<style> td {border-bottom: 3px outset green; }</style>";
print "<td valign='top' align='left'>";
print "<font color='red'><strong>".mysql_result($result, $i, 0)."</strong></font>";
print "<br>".mysql_result($result, $i, 1);
print "<br><font color='red'>".mysql_result($result, $i, 2)."</font>";
print "<br>".mysql_result($result, $i, 4);
print "</td>";
print "<td width=350 valign='top' align='left'>";
print "<br>Type: ".mysql_result($result, $i, 5);
print "<br>Emergency Care: ".mysql_result($result, $i, 6);
print "<br><br>";
print "<a STYLE='text-decoration:none' target='_blank'
href='http://maps.google.com/maps?f=q&source=s_q&hl=en&q="
.mysql_result($result, $i, 7)."'><b> Show Map</b></a>";
print "</td>";
print "</tr>";
$i=$i+1;
}
mysql_free_result($result);
mysql_close($link);
}
print "</table>"
?>
</form>
</body>
</html>