How to post variables to a new page
Posted: Thu Sep 14, 2006 5:26 pm
Hello - I am new to the php world, but learning quickly.
I am working on a custom shopping cart page, index.php.
The form contains:
<FORM METHOD=POST ACTION="index.php">
In the form I have 'onchange="this.form.submit()" for the qty textbox's, so when the users enters or changes a qty the form submits and refreshes with a (php) calculated price based on quantity.
The form works great , but I cannot figure out how to add a button on the form to POST the variables to a new page.
I have tried adding a sub-form inside of the form with the cart button using
<FORM METHOD=POST ACTION="cart.php">
but it seems to ignore the cart.php, and if I add the button outside the form I lose all of the variables?
Any tips or suggestions appreciated -
Rob
I am working on a custom shopping cart page, index.php.
The form contains:
<FORM METHOD=POST ACTION="index.php">
In the form I have 'onchange="this.form.submit()" for the qty textbox's, so when the users enters or changes a qty the form submits and refreshes with a (php) calculated price based on quantity.
The form works great , but I cannot figure out how to add a button on the form to POST the variables to a new page.
I have tried adding a sub-form inside of the form with the cart button using
<FORM METHOD=POST ACTION="cart.php">
but it seems to ignore the cart.php, and if I add the button outside the form I lose all of the variables?
Any tips or suggestions appreciated -
Rob