hii..
i am getting error msg when running this program. pls verify if anybody can..
code:
<?php
session_start();
//session_register("username");
//session_encode();
//$url="Location:loggedin.php?PHPSESSID=".$PHPSESSID;
// header($url);
if(isset($_POST['submit']))
{ if(empty($password)){echo "No password specified";}
$connection=mysql_connect("localhost","wwwuser_raja","kalika");
if(!$connection)
{echo"<b>connection not set...</b><br>";}
$sel=mysql_select_db("wwwuser_raja");
if(!$sel)
{echo"<b>database not selected...</b><br>";}
$query="select password from users where username='".$username."'";
$result=mysql_query($query);
if($row=mysql_fetch_array($result))
{
if(!(md5($password)==$row["password"]))
{echo "Wrong Password !";}
}
else
{echo "<b>User does not exists !!</b>";}
//session_start();
session_register("username");
session_encode();
$url="Location:loggedin.php?PHPSESSID=".$PHPSESSID;
header($url);
}
?>
error:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php:1) in /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php:1) in /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php:1) in /hsphere/local/home/wwwuser/home.mishra.biz/addressbook/login.php on line 28
pls veryfy soon ..waiting for rply..