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 ... b77&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.
XUpload - keep session id when redirected
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
You have to create 2 hidden fields in your HTML:
fill these fields with actual osCsid & pID values. Then after upload they will be sent to your PHP
Code: Select all
<input type="hidden" name="osCsid" value="8d8d0b427c0feee42ded3f2f8657fb77">
<input type="hidden" name="pID" value="45">
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
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:
The code will be like this:
Code: Select all
<input type="hidden" name="osCsid" value="$_GET[osCsid]">
<input type="hidden" name="pID" value="$_GET[pID]">