1){ $studid = $_SESSION['studentid']; }else{ $studid = '0'; } }else{ $studid = $_SESSION['studentid']; } $dbhost = 'oakland'; $dbuser = 'iuptutor_data'; $dbpass = 'f8}eSK=#UGbR'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $sql = "SELECT * FROM results where studentid=$studid ORDER BY resultid DESC"; mysql_select_db('iuptutor_data'); $retval = mysql_query( $sql, $conn ); if(! $retval ){ die('Could not get data: ' . mysql_error()); } if((isset($_SESSION['studentid']))){ echo '
'; if($studid=="0"){ echo 'Invalid Account, you need to login First before submitting your score. Click here to login
'; } echo ''; } else{ echo 'Invalid Account, you need to login First before submitting your score. Click here to login
'; } mysql_close($conn); ?>