View Single Post
Old 05-05-2005, 10:40 PM   #27 (permalink)
BUFFY
Registered User
 
Join Date: May 2005
Posts: 29
BUFFY is on a distinguished road
Thanks again DJ, GET worked fine with it in the form but i ended up have it all on the one page so changed them all to POST after all

I got another question.
I have logged in a tutor or student, and when I go back to the login page it shows the login form even though i have a if statement saying if loggedin==true then dont...
I don't think I am setting the variables to session, as when I type $fullname (which should is set in the login) i can't show it once i leave the include and go to a page which should display the variable.

Im thinking I have to have something like SESSION['$username'] ? and was just wondering if i can have this add my normal $ stuff eg I have this already:

PHP Code:
if($_POST["username"])
{
  
$username=$_POST["username"];
  
$password=$_POST["password"];
}
elseif(
$_SESSION["username"])
{
  
$username=$_SESSION["username"];
  
$password=$_SESSION["password"];
}
else
{
  
//Set username and password defaults for security.
  //Stops hackers setting these vairables through the URL 
  
$username='';
  
$password='';

How do i make sure these are going to be set throughout the pages?
BUFFY is offline   Reply With Quote