I found out that it is a setting in the PHP that I have it incorrect. I gave up on trying to find out what the problem is. The campus PHP engine is working and I'm using that; however, I am back to my initial question again. That is how do I write a script that will search the database for records from a range of years. Each year will contain some records and some year may not. If I use the following select statment:
$limit=10;
for($i = $yrFrom; $i <= $yrTo; $i++){
$query = "select distinct * from email where Fyear = $i order by Fname LIMIT $page, $limit";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
}
Then for example, if year 1940 has 15 records, 1946 has 20 records, 1950 has 22 records and any year between 1940 and 1950 that does not have any records will not show anything. The problem is, the "LIMIT" show 10 records per year and not per page. So therefore, there will be a total of 30 records in one page.
Here's the url to this page I'm testing.
http://www.uwstout.edu/temp/foundation/alumni/emlSearch_test.shtml
Valid years are from 1936 to 1970.
If anyone has an idea, please help me out.
Thanks!
Lauj