| View previous topic :: View next topic |
| Author |
Message |
watcha
Joined: 08 Oct 2006 Posts: 12
|
Posted: Oct 18, 2006 8:38 am Post subject: keep session id when redirected |
|
|
I put the source of upload_form.html into a php page, which checks it the users has a valid session, otherwise the user will be redirected to a login site.
It looks like this with a valid session:
http://uploadtest.com/upload.php?osCsid=8d8d0b427c0feee42ded3f2f8657fb77&pID=45
Once the upload is done, the user is redirected to a success page, but the session ID gets lost. How can I keep the session id?
Thank you very much in advance.
BTW: I already posted this request yesterday, but its lost, therefore I created this post a second time. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Oct 18, 2006 9:55 am Post subject: |
|
|
You have to create 2 hidden fields in your HTML:
| Code: |
<input type="hidden" name="osCsid" value="8d8d0b427c0feee42ded3f2f8657fb77">
<input type="hidden" name="pID" value="45">
|
fill these fields with actual osCsid & pID values. Then after upload they will be sent to your PHP |
|
| Back to top |
|
 |
watcha
Joined: 08 Oct 2006 Posts: 12
|
Posted: Oct 18, 2006 12:35 pm Post subject: |
|
|
Thank you very much for the "turobed" reply.
The values (osCsid and pID) are dynamic.
So puttin the values hardcoded into the html source woulnd't help.
So this is more like a general web programming issue.
Anybody there to give me some hint?
Thank you very much in advance. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Oct 19, 2006 5:48 am Post subject: |
|
|
Ah! I know they are! But it's not simple HTML, it's PHP file you said. So you can get parameters from current URL and put them inside resulting HTML code.
The code will be like this:
| Code: |
<input type="hidden" name="osCsid" value="$_GET[osCsid]">
<input type="hidden" name="pID" value="$_GET[pID]">
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|