[pmwiki-users] Passing variables from one page to another

The Editor editor at fast.st
Fri Jun 23 14:18:45 CDT 2006


Hi all!

Thanks for the suggestion to use session variables.  Well, I took a
stab at it.  I added the following lines to my recipe, just before the
values are added to the htpasswd file, so I know the variables are
available here.

      session_start();
      $_SESSION['myname']=$newName;
      $_SESSION['mypass']=$newPass;
      . . .
      $arr[] = array($newName, $newPass);
      HandleBrowse($redirect_page);

And then I put these lines in the local config.php of the redirect page.

      session_start();
      $FmtPV['$MyName'] = $_SESSION['myname'];
      $FmtPV['$MyPass'] = $_SESSION['mypass'];

Unfortunately the page variables don't show up!  I did notice,
strangely enough, the url in the address bar stays the same as the old
page even though the redirect shows up on the screen.  And, a
promising sign, if I go to the redirect page directly, the name
variable at least will show up.  Any suggestions?

Also, do I need a session_destroy() in the local config page?  Thanks
for any help anyone could give.

Cheers,
Caveman




More information about the pmwiki-users mailing list