Re: Problem using session bu submitting the session id through a form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Not certain what is happening try the following script. On my machine the form retains the session ID. Note the sending the ID as a GET is only done for cross checking. You can remove it and there will be no change in the display.

<?php
session_start();
?>
<html>
<body>
<?php
$id = session_id();
echo $id
?>
<form action=test1.php?<?php echo $id?> method=post> <input type=submit></form>
</body>
</html>


If you run this and don't get the session ID being maintained then there would appear to be some problem with your set up but we'll probably require more info OS php version etc.

graeme.

Henk Jan Wils wrote:

Hi,

My session only seems to work when I use the link-tag (like <a href="nextpage.php?PHPSESSIONID=blahblah">blah</a>

But when I send the sessionid within a form in a hidden tag (<input type=hidden name=phpsessionid value=blahblah>) the session stops. For my session working correct i have to send my sessionid at every link and at every submit. My question now is, how can i send the sessionid by using a form and not by putting the sessionid in the <a>-tag?

Greetz Henk Jan

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux