PDA

View Full Version : Best method to pass variables...


DrkFusion
12-12-2002, 08:42 PM
How would I pass variables in vB where the template only redirects to the page that will actually execute some functions that need the variables?

All I am using in the template that redirects after submit is a meta tag, I want to pass all variables through, but I don't want to make an extra submit button. Any Methods?

Thanks

Erwin
12-13-2002, 01:02 AM
In the URL to the file, add ?yourvariable=xxx

Where you have $yourvariable in the PHP file.

For example, use this URL:

http://www.yoursite.com/yourfile.php?yourvariable=xxx&secondvariable=yyy

DrkFusion
12-13-2002, 01:19 AM
umm, that wouldn't work because some multi line text will be passed.

Erwin
12-13-2002, 01:37 AM
Oh, I see... why don't you just call the same template from the PHP file so the variables are included?

DrkFusion
12-13-2002, 08:14 PM
I don't get it?

Erwin
12-13-2002, 09:45 PM
ie. instead of redirecting from a template, redirect to the PHP file which calls that template.

Just tell us what you're trying to do and see if we can help.

DrkFusion
12-14-2002, 01:49 PM
Well I have modified Lesanes store hack alot and it consits of 3 files, store.php (skeleton of operation) store2.php runs all functions store3.php (informs the user after purchase, providing more info on how to go about...)

In store2.php it uses a tempalte where they fill out there address and other mailing details, on step to it confirms it, while it confirms when they click the confirm button I want it to go to a template that will redirect to the last step because if it continues on with the execution of queries on the step right after the confirm, if they refresh before the page loads they can get 2 items or 3 etc.

DrkFusion
12-14-2002, 03:14 PM
Does anyone know if a HEADER Location redirect in php would work