From: | arun kv <arun(at)library(dot)iisc(dot)ernet(dot)in> |
---|---|
To: | PGSQL <pgsql-php(at)postgresql(dot)org> |
Subject: | Header problem |
Date: | 2002-05-20 09:33:10 |
Message-ID: | Pine.BSO.4.40.0205201445040.13561-100000@library.iisc.ernet.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Hello Sir,
I am designing login page for user authentication.
Here is my sample code:
index.php
<? ?>
<form action="login.php" method="POST">
Username <input type="text" size="10"
name="username">
Password
<td><input type="password" size="10" name="password">
<input type="submit" name="submit" value="Log In"></td>
</html>
login.php
<?php
// login.php - performs validation
// authenticate using form variables
$status = authenticate($username,$password);//function which returns an
//integer either 0 or 1
// if user/pass combination is correct
if ($status == 1)
{
// initiate a session
session_start();
// register some session variables
session_register("SESSION");
// including the username
session_register("SESSION_UNAME");
$SESSION_UNAME = $username;
// redirect to protected page
header("Location: /securejlt.php");
exit();
}
When I enter username and password in index.php and give submit, am
getting the error "headers already sent".
The manual says that wwe should not have any echo statement before
header statement. I am not using any echo or print statement before header
function is called in my login.php.
I am not able to make out what the problem with my code.
Please help me out in this problem
Regards,
Arun
From | Date | Subject | |
---|---|---|---|
Next Message | ktt | 2002-05-20 11:20:13 | unable to insert rows with php |
Previous Message | Eckhard Hoeffner | 2002-05-19 12:45:01 | Re: php-postgres-apache Security |