i have a form and checkloginstudents.php,,but my problem,i can't display the details of a user after login,,
this is my form:
<form id="form1" name="form1" method="post" action="check_login_students.php">
<label>Name
<input name="username" type="text" id="textfield" />
</label>
<label>Password
<input type="password" name="password" id="textfield2" style="margin-top:5px;" />
</label>
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>
</form>
and this my checkloginstudents.php
`<?php
mysql_connect('127.0.0.1','root','rommelbarrio');
mysql_select_db('system');
$username= $_POST['username'];
$password= $_POST['password'];
$quer_get = mysql_query("select * from account_student where username='$username' and password='$password'");
if((mysql_num_rows($quer_get))>0)
{
while($row_quer_get=mysql_fetch_array($quer_get))
{
$db_username = $row_quer_get['username'];
$db_password = $row_quer_get['password'];
}
setcookie("POGI","$db_username");
header("location:system.php");
}
else
{
header('location:errorlog.php');
}
?>
i'm using cookies not session,,my plan is to display the details of a user into textbox,,appreciate your help..:}