Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2013, 11:26 AM
Registered User
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing value from one page to another. Then target value for shipping cost

can anyone teach me how i can pass form value from one page to another using the post method so that on the 2nd page, depending on the value passed forward, a user gets charged $5 shipping or get free shipping?

I want the values "collect" and "mail" to be passed on. But i duno how on the 2nd page do i target them to determine the shipping cost for the user.

I suppose it will need an if statement and call a function via php/java?

page1
<form action="contact.php" method="post" name="myemailform">
Method of Ticket Collection:<br>
<select name="method">
<option value="collect">By Self Collection</option>
<option value="mail">By Mail</option>
</select>


page 2
<form action="https://www.paypal.com/cgi-bin/w… method="post">
<fieldset>
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="business" value="XXXXXXXXXX" />
<input type="hidden" name="item_name" value="Item" />
<input type="hidden" name="tax" value="7.14" />
<input type="hidden" name="amount" value="238.00" />
<input type="hidden" name="currency_code" value="AUD" />
<input type="hidden" name="handling" value="0.31">
<input type="hidden" name="handling_cart" value="5.00">
<input type="hidden" name="return" value="https://minicart.paypal-labs.com/… />
<input type="hidden" name="cancel_return" value="https://minicart.paypal-labs.com/… />
<strong>VIP $238.00</strong>

<input type="submit" name="submit" value="Add to cart" class="button" />
</fieldset>
</form>





Similar Threads
Thread Thread Starter Forum Replies Last Post
sending image from source page to target page hinishant_13 General .NET 1 February 12th, 2011 08:58 AM
Why Shipping address is not validated? webeye BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 September 18th, 2008 10:31 AM
Shipping costs Rebel BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 12 November 1st, 2007 10:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.