Forum Moderators: coopster

Message Too Old, No Replies

Confirmation of input!

         

toltec75

7:53 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



So I have a user which types his data into the form, presses OK and on the second page he gets a display of his data and a chance to process it into the database or to alter it so that those informations are again loaded into the form where he can make all the neccessary changes!

How do I load the data into the form again where the user can change it!

it`s a bit of a hurry and I`m not asking for the whole code but just a hint or an advice!

Thank you!

eggy ricardo

8:03 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



If it is text boxes you could probably add
value="$_POST['value']"
to your inputs. Just use the posted data where you would normally set the default values for other inputs.

Hope this helps

Cheers
Richard

toltec75

8:13 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



Yeah I know that one, but I wanna display the data the user typed in a table or whatever, not in the form again! and then give him the oportunity to load that data again in the form if he wants to change it or to just click OK and process it into the database!

I`ve figured I could put the value of hidden text fields to what the user typed, and that could load data into forms again but I also have radio buttons as well and I think there`s probably a better way of doing this!

jatar_k

8:16 pm on Oct 27, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I usually use the hidden values method and then give them the 2 buttons 'continue' and 'back'.

works just fine

toltec75

8:23 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



Well, I guess i`ll just use it then! Thanx guys!

toltec75

8:32 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



Hmm, how exactly do I get back to previous page in PHP? Is there a special function for that, cause clicking on a link that would lead to previous page would most probably delete all the user input!

or am I mistaken?

I`m actually asking these questions on behalf of a friend so I have no way of checking it out myself!

jatar_k

8:38 pm on Oct 27, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could just actually use

javascript:history.back();

that doesn't pass a full refresh (usually). or you could repost the form to the original page and fill in the values as mentioned before.

toltec75

9:24 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



OK! I`ll check it out!