|
Go4Expert Founder
|
![]() |
| 26Sep2011,13:13 | #131 |
|
Light Poster
|
|
| 30Sep2011,10:30 | #132 |
|
I am trying to make a login form and i've tried the coding that u gave... But it doesn't work.. Everytime I try to run the program "Parse error: syntax error, unexpected $end in C:\xampp\htdocs\login.php on line 89" always comes out.. i change the document of index into index1 as i also have another document in htdocs folder, but i also change the script in login.php
Code:
if ($username=="" or $password=="" )
{
echo "<h1>Username or password is blank</h1>";
clearsessionscookies();
header("location: login.php?returnurl=$returnurl");
}
else
{
if(confirmuser($username,md5($password))) // As pointed out by asgard2005
{
createsessions($username,$password);
if ($returnurl<>"")
header("location: $returnurl");
else
{
header("Location: index1.php"); (this one from index.php into index1.php)
}
}
else
{
echo "<h1>Invalid Username and/Or password</h1>";
clearsessionscookies();
header("location: login.php?returnurl=$returnurl");
}
}
break;
case "logout":
clearsessionscookies();
header("location: index1.php"); (from index.php into index1.php)
break;
|
|
Light Poster
|
|
| 19Oct2011,12:19 | #133 |
|
Sessions and Cookies are really nice interesting topic to cover. Thanks for sharing mate. Actually i was searching the coding that you given, But now its all clear. I found 2-3 but was not applicable
|
|
Newbie Member
|
|
| 9Nov2011,14:04 | #134 |
|
so cool explained... happy to read it ,thanx for this bro
|



