Can I use sessions to solve a problem?
I have a set of three pages called say "pick", "edit" and "confirm". The edit page is on one of a set of 5 spry tabbed panels.The server is unix and the machine uses windows 64 bit and CS5.5.
Pick uses a drop down list to select an item to edit. It then sends the record index to the edit page where it is edited.
Edit then updates the page and sends the user to the confirm page where he told that the edit was OK and is given a link that takes him back to the edit page.
So far everything works fine - the record is edited and the user knows it. But he needs to be able to check it, and that's the problem..
While this link does send the user back to the previous page, it does not send any info as to which record it should pull out.
I have tried to store the value of the record index in a session, but just cannot get it to be available ion the confirm page.
As soon as I enter <?php session_start() ?> on line 1 of any page, I get the message :
Warning: Cannot modify header information - headers already sent on line 1 on the pick page and line 62 on the edit page as soon as a button is pressed, or, in the case of the edit page, as soon as live View is active.
This line is where the page is directed to the next page using a stock Dreamweaver udate record behaviour.:
$updateGoTo = "editok.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}header(sprintf("Location: %s", $updateGoTo)); // This is line 62.
I have checked all the lines for white space, made sure that the instruction is on line 1 and have no include files other than connection files, all with no white space. Matters not whether I put them before or after the session start instruction.
I even created a new page with just a form and a field to send and this gives the same message - this was not on a spry panel..
PHP ini has the path to sessions set up, and sessions are visible there.
I get the feeling that the tabbed panels could be part of the problem, as when the user lands on the edit page, he has to select the second panel, so some output must have been sent to the browser.and that would kill the session I think?
Is there a way of passing the info from page to page without using sessions?
