Forum Moderators: coopster
my local server has php 5.0.4 and remote has got 5.2.6....will that affect?
my script is very basic...
FILE: logincheck.php
<?php
session_start();
if(isset($_POST['username']) && isset($_POST['password']))
{
$username=$_POST['username'];
$password=$_POST['password'];
if ($username=="xyz" && $password=="xyz")
{
session_register('login');
$_SESSION['login']=true;
}
else
echo "incorrect username or password";
}
?>
/////
Some HTML Code
/////
<?PHP
if(isset($_SESSION['login']) && $_SESSION['login']==true)
{
echo "<a href='../admin/logout.php'>Logout</a>";
}
else
echo "<a href='../admin/index.php'>Login</a>";
?>
Other than that it looks fine. GL