//ini_set("error_reporting","E_ALL & ~E_NOTICE");
//connect to server and select database; you may need it
$conn = mysql_connect("userdb","kalodimos","189cgpy-") or die(mysql_error());
mysql_select_db("kalodimos_db1",$conn) or die(mysql_error());
?>
Υπολογισμός Μορίων απο τα Προφορικά και τα Γραπτά
/*
If register_global is off in your server then after reloading of the page to get the value of cat from query string we have to take special care.
To read more on register_global visit.
http://www.plus2net.com/php_tutorial/register-globals.php
*/
@$cat=$_GET['cat']; // Use this line or below line if register_global is off
if(strlen($cat) > 0 and !is_numeric($cat)){ // to check if $cat is numeric data or not.
echo "Data Error";
exit;
}
//@$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off
///////// Getting the data from Mysql table for first list box//////////
$quer2=mysql_query("SELECT DISTINCT id_kat ,onoma_kat FROM m_katefthinsis order by id_kat");
///////////// End of query for first list box////////////
/////// for second drop down list we will check if onoma_kat is selected else we will display all the subonoma_kat/////
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query("SELECT DISTINCT onoma_math, id_math FROM m_sidelestes where id_kat=$cat order by id_math");
}else{$quer=mysql_query("SELECT DISTINCT onoma_math, id_math FROM m_sidelestes where id_kat=9 order by id_math"); }
////////// end of query for second subonoma_kat drop down list box ///////////////////////////
echo "";
?>