Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Retrieving a session variable

Quote Reply
Retrieving a session variable
Is it posssible to retreive a php $_SESSION['string'] from within a cgi script? If so, how?

I have a php script that starts a session and saves a password...
Code:
session_start();
$_SESSION['string'] = $password;
Then during a form submission, it retrieves the password and compares it to what was entered...
Code:
session_start();
$string = strtoupper($_SESSION['string']);
$userstring = strtoupper($_POST['userstring']);
session_destroy();

if ($string == $userstring) {
success();
exit();
} else {
failure();
exit();
}

I would LIKE to do the session setting using php, and
just need to retrieve it's value from a cgi file (plugin).

If not, Can I (via php) save the session to LSQL session tables ???
So I can retrieve it from there from within a plugin?

Thanks for any assistance.
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Retrieving a session variable In reply to
you could include the php file via ssi or something like that?

r
Quote Reply
Re: [ryel01] Retrieving a session variable In reply to
That wasn't very helpful. Unsure

I do not want to include a file (although I tried).

I want to retrieve a variable in a plugin that gets set in a php file.

I think the only way to do so is via a session like the example I gave?

The variable only needs to be around for say 5 min, then it can expire.

Thanks again,
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com