on 9/24/01 10:56 AM, Thomas Deliduka at [EMAIL PROTECTED] wrote:

> <FORM ACTION="index2.php" METHOD="POST">
> VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT TYPE=SUBMIT
> VALUE="go"><BR>
> </FORM>
> 
I dont see where the SID is being passed to the next page. I recently
struggled through getting sessions to work, and for me I had to send SID
myself manually, the server wouldn't send it via a cookie.


I have mine set up a little differently, something like

------------

//index.php
<?php
session_register("var1");
session_register("var2");
$var1 = "the session...";
$var2 = "worked";
?>
<html>
<body>
<a href="index2.php?<?=SID?>">Go to page two</a>
</body>
</html>

//index2.php
<?php
session_start();

echo "var1 is $var1 and var2 is $var2";

session_destroy();
?>

-----------

You can also send the SID in a form via
<form method="post" action="nextpage.php?<?=SID?>">


I use the constant SID and the shorthand <?=SID?> because that is what is
recommended and demonstrated on php.net

Matt


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to