Re: Sessions
| From: | Roman Lichszteld | Date: | Thu, 26 Apr 2001 07:13:20 +0000 |
| Subject: | Re: Sessions | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-7054@lists.php.net to get a copy of this message | ||
> I haven't worked with trans_sid much, so I'm not very familiar with the
> specifics.
>
> The problem is that the get variable PHPSESSID or whatever is passed as a
> get while the action of a form is POST.
>
> One workaround is to create a hidden input named PHPSESSID or SID and set
> it's value to <? echo $SID ?>.
>
> Good luck, and let me know how you fixed it!!! ;-)
> -Joe
> I haven't worked with trans_sid much, so I'm not very familiar with the
> specifics.
>
> The problem is that the get variable PHPSESSID or whatever is passed as a
> get while the action of a form is POST.
>
> One workaround is to create a hidden input named PHPSESSID or SID and set
> it's value to <? echo $SID ?>.
>
> Good luck, and let me know how you fixed it!!! ;-)
> -Joe
Upps, I only got message: "Warning: Undefined variable: SID". I really don't
know why!
But now I changed some things - now I'm not using any frames and startup
page "teststart.php" looks like this:
<?
$LoggedUserID="UserID";
$LoggedUserName="Session tester";
$LoggedUserPass="somepassword";
session_start();
session_register("LoggedUserID");
session_register("LoggedUserPass");
session_register("LoggedUserName");
print("<CENTER>\n");
print("<A HREF=\"test1.php\">Click here to continue...</A>\n");
print("</CENTER>\n");
?>
Script "checkuser.php" (included at the top of 'test1.php') :
<?
session_start();
if( empty($LoggedUserID) || empty($LoggedUserPass) ||
empty($LoggedUserName) )
{
print("<FORM name=\"URLForm\" method=\"post\"
target=\"_top\"
action=\"../start.php\">\n");
print("<INPUT type=\"hidden\" name=\"StartPage\"
value=\"Login\">\n\n");
print("</FORM>\n");
print("<SCRIPT language=\"JavaScript\">\n");
print("<!--\n");
print("document.URLForm.submit()\n");
print("//-->\n");
print("</SCRIPT>\n");
}
?>
And... I never achieve 'test1.php', I'm ALWAYS redirected to 'start.php'!
In folder where session id's re stored on the server appear new session
files...
Regards
Roman Lichszteld
RLichszteld@interia.pl