XUpload - keep session id when redirected

Message
Author
watcha
Posts: 12
Joined: Oct 08, 2006 1:08 am

keep session id when redirected

#1 Postby watcha » Oct 18, 2006 8:38 am

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.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Oct 18, 2006 9:55 am

You have to create 2 hidden fields in your HTML:

Code: Select all

<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

watcha
Posts: 12
Joined: Oct 08, 2006 1:08 am

#3 Postby watcha » Oct 18, 2006 12:35 pm

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.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Oct 19, 2006 5:48 am

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: Select all

<input type="hidden" name="osCsid" value="$_GET[osCsid]"> 
<input type="hidden" name="pID" value="$_GET[pID]">