I have a page with two links: link1 and link2.
When the user click link1, then the session FOO should be set to 1.
When the user click link2, then the session FOO should be set to 2.
Is there a way to do this with data assist?
And is there a way to set the session value without showing the session variable value in the address bar of the browser? (i.e.: using form instead of links)?
TIA for any help.
tony
Perhaps I found the solution (but I'm not sure WHY it works !!):
I changed the two links in the start page with two forms (each with only an image button to submit the form; the form action points to the "destination page").
Then, I added 2 "Set session variable" to the start page (using the "button.... pressed"):
===== "Set session variable"1
<?php
@session_start();
if(isset($_POST["img-1"]) || isset($_POST["img-1_x"])) {
$_SESSION["FOO"] = "1";
}
?>
===== "Set session variable"2
<?php
@session_start();
if(isset($_POST["img-2"]) || isset($_POST["img-2_x"])) {
$_SESSION["FOO"] = "2";
}
?>
Then I cut the code above from the start page and pasted it to the "destination page".
This way it seems to work.
But I cannot edit the SBs anymore because the form is not on the destination page.
Is there a better way to do this?
TIA
tony