Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Carry Variables throughout oscommerce shop


Recommended Posts

Hello guys,

I very simple making a page once a customer logs in asking them a question. The variable is called payment. I have the form submission working and carrying the variable over to index.php, now i can print it on that page right after the form. how do i make it where now any page they click or the complete process they are going through until they click log out or finish there order this variable stays. As I am developing this I a printing the result on the page for debugging. Anybody that can help please using the $payment variable.


This is the only page it will print it on as I did a GET on that form




Now how do i carry that payment=1 via a post all throughout the order?

Link to comment
Share on other sites

I'm not to sure because i am new to php, but i read something like it in the book i'm learning from the other day. Sorry in advance if you don't understand this, go to http://www.hudzilla.org/phpbook/read.php/4_1_0 for a more detailed explaination


Pass the variable as a refernced parameter into a function and then call the function in the next pages. I don't think this would work but its worth a try.



somefunc($foo, $bar);

somefunc($foo, &$bar);

somefunc(&$foo, &$bar);



The other thing i can think of is to make the variable a global varible, but you'll have to read up about that.

Menou and unome

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...