Need help "traveling" between pages
Posted: Fri Jun 10, 2005 12:11 pm
Hi,
This may seem like an elementary problem, and I would surely be shunned from the "cool kids" group if I asked anyone I know. I have no web programming experience and am trying to teach myself php. Now that you know where I'm coming from, here is my question...
My website consists of several "steps" that gather input from the user. In each step, variables are created from the form input. In the end, all of the variables are used in math equations to produce some end result that is reported to the user. Each "step" is to be a new page, so the user is kind of led through a series of form-rittled pages ending in eudamonia and eternal happiness.
My problem arises in linking from page to page. I could construct my series of steps as one .php file consisting of many "if/elseif" steps which would, after each form submission, allow the program to proceed to the next "elseif" statement, effectively looking like new pages.
However, I would prefer to have one "if" statement in each .php file which would send a form if some variable is empty. After the form is submitted, the variable would be filled and the program would go to one "elseif" statement. Inside of this elseif statement I would like for there to be a code that sends the user to a new .php page which would act as the next step in the path to euphoria. This would allow me to have a series of .php files that would each be individual pages in my site. Each would point to a new page at its end. Pretty basic I bet, but only if you know how.
Any help would be greatly appreciated.
This may seem like an elementary problem, and I would surely be shunned from the "cool kids" group if I asked anyone I know. I have no web programming experience and am trying to teach myself php. Now that you know where I'm coming from, here is my question...
My website consists of several "steps" that gather input from the user. In each step, variables are created from the form input. In the end, all of the variables are used in math equations to produce some end result that is reported to the user. Each "step" is to be a new page, so the user is kind of led through a series of form-rittled pages ending in eudamonia and eternal happiness.
My problem arises in linking from page to page. I could construct my series of steps as one .php file consisting of many "if/elseif" steps which would, after each form submission, allow the program to proceed to the next "elseif" statement, effectively looking like new pages.
However, I would prefer to have one "if" statement in each .php file which would send a form if some variable is empty. After the form is submitted, the variable would be filled and the program would go to one "elseif" statement. Inside of this elseif statement I would like for there to be a code that sends the user to a new .php page which would act as the next step in the path to euphoria. This would allow me to have a series of .php files that would each be individual pages in my site. Each would point to a new page at its end. Pretty basic I bet, but only if you know how.
Any help would be greatly appreciated.