Hello,
I seen to be having a minor problem will passing variables to another page. Here's what I have so far.
<?php
$conn=mysql_connect("localhost","user","password"
or die("Could not connect " . mysql_error());
//print "Connected successfully";
mysql_select_db("mylog",$conn) or die("Could not select database"
;
$sql = "select userid from logins where userID='$userID' and passID = '$passID'";
$result=mysql_query($sql);
if (mysql_num_rows($result)!=0)
{
header('location
eter.php?$userID');
}else{
print "<h2>Invalid Username or Password.</h2>";
}
?>
---------------------------Code for the next page-------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
My Next Page
<?php
print $userID;
?>
</body>
</html>
However, I get a Notice: Undefined variable: userID in C:\mysql\data\mylogin\peter.php on line 10
The varible will not pass to the next page.
Any assistance would be helpful.
Thanks
KJ
I seen to be having a minor problem will passing variables to another page. Here's what I have so far.
<?php
$conn=mysql_connect("localhost","user","password"

or die("Could not connect " . mysql_error());
//print "Connected successfully";
mysql_select_db("mylog",$conn) or die("Could not select database"

$sql = "select userid from logins where userID='$userID' and passID = '$passID'";
$result=mysql_query($sql);
if (mysql_num_rows($result)!=0)
{
header('location

}else{
print "<h2>Invalid Username or Password.</h2>";
}
?>
---------------------------Code for the next page-------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
My Next Page
<?php
print $userID;
?>
</body>
</html>
However, I get a Notice: Undefined variable: userID in C:\mysql\data\mylogin\peter.php on line 10
The varible will not pass to the next page.
Any assistance would be helpful.
Thanks
KJ