Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loosing my variables!

Status
Not open for further replies.

georgeocrawford

Technical User
Aug 12, 2002
111
GB
Hi - hope you can help!

I am sending variables from a html form to a php script which validates the form.

If the form is OK, the script presents the contents of the form in a table for the user to check.

The user then clicks OK, and the data is emailed and added to a mySQL database.

The only problem is this:

On page 2 ("please check your details are correct..."), the variables are displayed perfectly.

However, at the next step they seem to disappear, so that both the cells in the email and the fields in the new SQL entry are blank!

At some stage I have lost the variables - I'm confused.

Ever if I put a simple

Code:
echo $name;

on page 3 (the "thank you page"), it is empty and prints nothing. I KNOW $name has had a value at some stage, because it prints on page 2.

Can anyone suggest what I've done wrong, and how to carry the variables' values on.

Thanks

 
Do you print a hidden form on stage 2? If you don't, the variables wouldn't be available to the third script. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top