Page 1 of 1

Three steps upload form doesn't work - I have two problems

Posted: Sun Jun 14, 2009 9:37 am
by hippie
Hi!

At the beginning I must point that I'm from Poland, so sorry for my poor English.

As you can see on topic I have two problems with my PHP script. It is really simple form in three steps (first step - user fills some fields, second - file sending, third - photos sending).

My first problem:

I have few variables, but important is now variable $style. It is style name - using this var I'm creating folder (in first step) and to this folder I'm sending file and photos from steps 2 & 3. So - I don't know how to send this var to my script. I've tried cookies and sessions, but I don't know why, it isn't working. Folder is creating fine, but $_POST table is cleaning after form send, so I must send this variable to second step. How to do this?

Second problem:

I must secure my script (user can't get to next step without passing previous). Script gets step ID through $_GET, for example upload.php?step=1. How to do this, that user can't get into step=2 without passing step=1. I thought about sessions, but I don't know how to do this.

And this is my code:

http://wklej.org/hash/03600d2db6/

Thanks for help.

Best regards, Hippie.

Re: Three steps upload form doesn't work - I have two problems

Posted: Mon Jun 15, 2009 8:01 am
by hippie
I must add, that file sending is working, but file isn't sent there where it should be. It should be in /themes/tmp/$style/, but it is in /themes/tmp. What must I do?