if(isset($_REQUEST["pwd"]) && isset($_REQUEST["name"]))
{
$password = $_REQUEST['pwd'];
$name = $_REQUEST['name'];
$checkUserPass = mysql_query("SELECT * FROM validPersonnel WHERE Passkey = '$password' and Name = '$name'", $conn);
if(mysql_num_rows($checkUserPass) == 1)
{
$personnelId = mysql_query("SELECT PersonnelID FROM validPersonnel WHERE Passkey = '$password' and Name = '$name'", $conn);
while($row = mysql_fetch_assoc($personnelId))
{
//echo $row['PersonnelID'];
//flush ();
var_dump($row);
}
//setcookie()
mysql_close($conn);
echo "<br/><br/>";
echo "<script>alert('Logged In.')</script>";
header("Refresh: 1; url=profile/profile.php?id="'.$row['PersonnelId'].');
//header('Refresh: 1; url=test.php?id=$personnelId');
}
else
{
echo "<br/><br/>";
echo "<script>alert('Wrong Password.')</script>";
header('Refresh: 1; url=personnelselect.php');
}
}
?> strong text
i have this code and i want pass to profile/profile.php the value of $row. how can i efficiently do it? please help