Hi,
I need to create a multi-page form - a sort of wizard that sends variables from one page to the next in order to accumulate some variables for calculations on final completion of the form and also to let the next page know which section to show. This is not to send an email but simply to perform some calculations, show sections of form content depending on variables, etc. Hope that is clear enough....
Can anyone guide me as to how on earth this is done - I am a bit stuck on this and assistance would be very much appreciated.
-
☆ A M B ☆
- 24,524 Posts
You can use the $_SESSION to carry the values from page to page; that is what sessions are for, after all.
Yes, I could use sessions to hold the variables. However, I am using php to take the variables and decide in the page which parts of the form to show on the next page. I am doing this within a snippet as I am under the impression that php should be used within snippets and using echo ’ some text ’; to try and output to the page, but even a simple echo statement is not resulting in the form html being output to the page and I simply get a blank page.
Quote from: spooky at Dec 09, 2007, 04:33 AM
...even a simple echo statement is not resulting in the form html being output to the page and I simply get a blank page.
A blank page often means an error in your php code (or in the html it produces).
Just leaving off a ";" character from the end of a line of php code or having an odd number of quotation marks or parentheses will often confuse the php parser enough that it may just give up and produce an empty page.
Feel free to post your code here if you can’t fix it yourself.
Bob