I am not getting any errors.
I shall copy and paste my form code and then the code of the page that the form goes to (the code above basically)
I am also about to go so I will check back tomorrow
my form code is like this:
<?$dsn="conserve";
$username="sa";
$password="";
$sqlconnect=odbc_connect($dsn,$username,$password); ?>
<!--create form-->
<form action="maria.php" method="POST">
<br>
Select a date:
<select name="date_search">
<?
$sqlquery= "SELECT distinct doc_date_yr from documents;";
$process=odbc_exec($sqlconnect, $sqlquery);
while(odbc_fetch_row($process))
{
$doc_date_yr=odbc_result($process,"doc_date_yr");
echo "
<option>$doc_date_yr</option>
";
}
?>
</select>
<input type="submit" />
</form>
and maria.php looks like this
<?$dsn="conserve";
$username="sa";
$password="";
$connect = odbc_connect("conserve", "sa", "");
if ($_POST['date_search'] == 2004)
{
$result = odbc_exec($connect, "SELECT doc_date_yr, doc_url, doc_title
FROM documents
WHERE doc_date_yr=2004");
while ($row = odbc_fetch_array($result))
{
echo "<ul><li><a href='" . $row['doc_url'] . "'>'" . $row['doc_title'] . "'</a></li></ul>";
}
}
else
{
echo "you didn't search for 2004"
}
odbc_close($connect);
?>
I use the form to select a year and I get a blank screen for maria.php.
It is the end of a long day and I am sure I have done something mind numbingly stupid.
I will check back tomorrow to see if anyone has seen anything wrong.
Many thanks
yellowchimp