View Single Post
  #2 (permalink)  
Old 10-15-03, 04:22 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
but the "else" (error) statement is displaying at the top of the page.
can you explain this ? what exactly do you see ?

and note that you wrote :
PHP Code:

print "Access Confirmed";<br
and the <BR> should be inside the quote ..like this :
PHP Code:

print "Access Confirmed<br>"
and also use the single quote instead of the double one as long as you don't have variables inside .. using double quote makes your script slower .. try this one instead :
PHP Code:

<?php

$student_number 
$_POST['student_number'];
$unique_pass $_POST['unique_pass'];

If (
$student_number=="student_number" && $unique_pass=="unique_pass") {
echo 
'Access Confirmed<br>';
} else { 
echo 
'Access Denied<br>';
echo 
'Your Student Number or Password is incorrect.<br>';
echo 
'Please try again. Login Page';
}
?>
also as you can see I used echo instead of print .. but it doesn't matter anyway ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote