Ok so my main page has a session. I am using the session id to query the database.
Now when I post to a page I have session_start
() at the top but when I echo the session_id()
on the main page and on the page that was posted to they are 2 different values. Why is it changing the session_id()
?
Is there a way to make it keep the original value?
EDIT:
index.php
<?php
session_start();
echo session_id();
?>
<form method="post" action="post.php">
<input type="text" name="some_field" />
</form>
post.php
session_start();
echo session_id();
The session_id in index.php is different from the one in post.php!