Jump to content

redirecting


jalea148

Recommended Posts

There are 3 pages: A, B, C; B resides on another server.

 

With Session variables I can share form data on A with C when I post directly to C. However, if I post to B and redirect to C, sharing doesn’t seem to work with C. If this is possible, what are the guidelines [i.e. what needs to be added beyond what was necessary when the form in A posted directly to C]?

 

Link to comment
https://forums.phpfreaks.com/topic/58266-redirecting/
Share on other sites

tried cookies - no luck. If the post goes directly to C from A, POST, session variables and cookies all work - the form data from A appears in the form on C. However, if the form in A posts to a different form [off the server] and gets to the form on C via Redirect, no data appears in C's form.

Link to comment
https://forums.phpfreaks.com/topic/58266-redirecting/#findComment-289190
Share on other sites

in your config or in php.ini (doesnt really matter), find the auto_prepend_file part (or just put it in the config under where you added the php file types) and add

 

auto_prepend_file /data/sess.php

 

and in ~/data/sess.php have the following

 

<?php

session_start();

?>

 

 

 

that's a lazy way to do it, and also saves space :)

Link to comment
https://forums.phpfreaks.com/topic/58266-redirecting/#findComment-289227
Share on other sites

I don't control the server with pages A or C where they reside. So, it may be difficult to get at the auto_prepend_file, config or php.ini  files. Page B is on still another server.

 

Rather than using a redirect to bring up page C, would it be possible for the action in Page A to post to both page B and page C [using only 1 submit button]? Page B is never accessed by the user who should only see page C. [b is a service that requires it incoming data from a POST??? There would not be a problem if they accepted email.] Validation is required on page A. This would solve the cookie problem.

 

BTW, I can't trick it by posting directly to Page C - it already posts to formmail.php and redirects to thank you.

Link to comment
https://forums.phpfreaks.com/topic/58266-redirecting/#findComment-289941
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.