D]
Subject: [PHP] register session
I am trying to register a session after verification of username and
password.
It looks like this:
session_start();
If ($name = $aa) && ($username = $ab)
{
session_register("valid_user");
echo "window.location=\'admin_.php'\
Kris,
Idi na phpbeginner.com tam est 'tutorials' dlya tebya.
Vlad
-Original Message-
From: Kris Vose
Sent: 3 êâ³òíÿ 2002 ð. 12:42
To: [EMAIL PROTECTED]
Subject: [PHP] register session
I am trying to register a session after verification of username and password.
It looks
I am trying to register a session after verification of username and password.
It looks like this:
session_start();
If ($name = $aa) && ($username = $ab)
{
session_register("valid_user");
echo "window.location=\'admin_.php'\";
}
else
{
echo "Your username/password is incorrect";
}
On each pa
Well... Whadda ya know. Right after I sent the post I figured it out.
(Solution? Variable variables!)
function register_vars($reg_var) {
// Make the $reg_var global
$global_vars=explode("|", $reg_var);
for ($i=0; $i wrote in message
99dn35$duo$[EMAIL PROTECTED]">news:99dn35$duo$[EMAI
so your trying to take a list of variables and register them as session vars?
$val)
{
global $val;
session_register($val);
}
}
?>
this will work for that.
--
Chris Lee
[EMAIL PROTECTED]
""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message
99dn35$duo$[EMAIL PROTECTED]">
In article <99dn35$duo$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Tobias Talltorp") wrote:
> I am trying to register a session variable in a function without using the
> global in the beginning.
You can pass the variable(s) to the function as an argument. Perhaps it
will be easier to deal with a
I am trying to register a session variable in a function without using the
global in the beginning.
The reason for this is that I don´t always know how many variables I am
going to register (I separate the different fields with | like this,
"username|email|cellphone" and explode them).
Is there s
7 matches
Mail list logo