View Single Post
  #10 (permalink)  
Old 10-15-03, 08:02 PM
ermau's Avatar
ermau ermau is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Florida, USA
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
You've already done it....

Remove this:
PHP Code:

If ($student_number=="student_number" && $unique_pass=="unique_pass") { 

echo 
'Access Confirmed<br>'//not necessary to display
}
Else

echo 
'Access Denied<br>'
echo 
'Your Student Number or Password is incorrect.<br>'
echo 
'Please try again. Login Page'

And add this:
PHP Code:

if ($num == 0)

{
echo 
'denied';
}
else
{
echo 
'welcome';

After:
PHP Code:

$query=("SELECT * FROM studentinfo WHERE student_number='$student_number' AND unique_pass='$unique_pass'");

$result mysql_query($query);
$num=mysql_num_rows($result); 
__________________
PHP / mySQL Developer
Reply With Quote