I think you may be right, heres my statsinner.php code:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'Stats');
define('CSRF_PROTECTION', true);
// change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array('cpage_Statsmain',);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/Forum');
require_once('./global.php');
?>
<script type="text/javascript">
function load() {
var urlstring = window.location.href;
if (urlstring.indexOf("ch1=a") > -1) { document.form1.ch1.checked = true } else { document.form1.ch1.checked = false };
if (urlstring.indexOf("ch2=b") > -1) { document.form1.ch2.checked = true } else { document.form1.ch2.checked = false };
if (urlstring.indexOf("ch3=c") > -1) { document.form1.ch3.checked = true } else { document.form1.ch3.checked = false };
if (urlstring.indexOf("ch4=d") > -1) { document.form1.ch4.checked = true } else { document.form1.ch4.checked = false };
if (urlstring.indexOf("ch5=e") > -1) { document.form1.ch5.checked = true } else { document.form1.ch5.checked = false };
if (urlstring.indexOf("ch6=f") > -1) { document.form1.ch6.checked = true } else { document.form1.ch6.checked = false };
}
</script>
<?
if (isset($_GET['Submit1'])) {
if (isset($_GET['ch1'])) { $ch1 = $_GET['ch1'];
if ($ch1 == 'a') { $ch1 = 'checked';}
}
if (isset($_GET['ch2'])) { $ch2 = $_GET['ch2'];
if ($ch2 == 'b') { $ch2 = 'checked';}
}
if (isset($_GET['ch3'])) { $ch3 = $_GET['ch3'];
if ($ch3 == 'c') { $ch3 = 'checked';}
}
if (isset($_GET['ch4'])) { $ch4 = $_GET['ch4'];
if ($ch4 == 'd') { $ch4 = 'checked';}
}
if (isset($_GET['ch5'])) { $ch5 = $_GET['ch5'];
if ($ch5 == 'e') { $ch5 = 'checked';}
}
if (isset($_GET['ch6'])) { $ch6 = $_GET['ch6'];
if ($ch6 == 'f') { $ch6 = 'checked';}
}
}
//select the table
$query="SELECT * FROM medical_school WHERE CourseT = 'UG'";
if ($ch1 == checked) { // Order by resits only
$query .= " AND Resits = 'Yes'";
} if ($ch2 == checked) { // Order by clearing only
$query .= " AND Clearing = 'Yes'";
} if ($ch3 == checked) { // Order by biology only
$query .= " AND Biology = '-'";
} if ($ch4 == checked) { // Order by chemistry only
$query .= " AND Chemistry = '-'";
} if ($ch5 == checked) { // Order by ukcat only
$query .= " AND UKCAT = '-'";
} if ($ch6 == checked) { // Order by ukcat only
$query .= " AND Tests = '-'";}
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close(); ?>
<div style="width:880px; margin-left: 20px;">
<!-- Start of search options !-->
<a href="javascript:;" onmousedown="toggleDiv('advoptions');"><div id="sidebarheader" style="width:750px; margin-left: auto; margin-right: auto;">Advanced Search<div style="float:right"><img name="optionsimg" src="/nick/bararup.png" alt="minimize" border="0"/></div></div></a>
<div id="advoptions" class="calitext" style="width: 750px; padding: 5px 5px 5px 5px; border: 1px solid #A0A0A0; border-top: 0px; margin-left: auto; margin-right: auto; display: none;">
<form name="form1" method="GET" action="database5yr.php">
<table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="240" align="left" valign="top">Show courses that may allow:<br />
<input type = "Checkbox" Name ="ch1" value ="a" <? if ($ch1 == 'a') { echo 'checked';} else { echo 'unchecked'; }?> >
Resits<br />
<input type = "Checkbox" Name ="ch2" value ="b" <? if ($ch2 == 'b') { echo 'checked';}?>>
Clearing
</td>
<td width="240" align="left" valign="top">Show courses that do not request:<br />
<input type = "Checkbox" Name ="ch3" value ="c" <? if ($ch3 == 'c') { echo 'checked';}?>>
Biology<br />
<input type = "Checkbox" Name ="ch4" value ="d" <? if ($ch4 == 'd') { echo 'checked';}?>>
Chemistry </td>
<td width="240" align="left" valign="top">
Show courses that do not use the:<br />
<input type = "Checkbox" Name ="ch5" value ="e" <? if ($ch5 == 'e') { echo 'checked';}?>>
UKCAT<br />
<input type = "Checkbox" Name ="ch6" value ="f" <? if ($ch6 == 'f') { echo 'checked';}?>>
BMAT<br />
<div style="float: right"><input type = "Submit" name = "Submit1" value = "Find" /></div>
<br />
</td>
</tr>
</table>
</form></div>
<!-- End of search options !-->
<div id="ukmsabout" class="calitext" style="width: 880px; margin-left: auto; margin-right: auto; font-weight: bold; font-size: 14px;">
Click on a medical school name for more information</div>
<div id="sidebarheader" style="width: 880px; text-align:center; line-height: 35px; height: 35px; background-image: url(/nick/sidebarheaderback30.png)">
<table width="860" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="125"></td>
<td width="75"><div style="text-align: center">Applications:</div></td>
<td width="75"><div style="text-align: center">Places:</div></td>
<td width="75"><div style="text-align: center">Per place:</div></td>
<td width="75"><div style="text-align: center">Overseas:</div></td>
<td width="65"><div style="text-align: center">Offer:</div></td>
<td width="130"><div style="text-align: center">Subjects:</div></td>
<td width="120"><div style="text-align: center">Tests:</div></td>
<td width="60"><div style="text-align: center">Resits:</div></td>
<td width="60"><div style="text-align: center">Clearing:</div></td>
</tr>
</table>
</div>