hussein_787 Posted May 21, 2009 Posted May 21, 2009 Hi Im trying to pass a variable from an input box to another page the input is <input type="text" name="coupon1" /> i am trying to pass this value from checkout_shipping.php to checkout_payment.php so on checkout_payment.php i can grab the value I have tried code like below but I cant seem to get the value $coupon1 = $_POST['coupon1']; <input type="text" name="coupon" value="$coupon1" /> Any help would be great Unique skins and accessories for your media player device - iPod / iPhone / PSP / Nintendo / Xbox - www.iangel.co.uk
germ Posted May 21, 2009 Posted May 21, 2009 Make it a session variable. In checkout_shipping.php after you set the value for $coupon1, add this code: <?php if ( ! tep_session_is_registered('coupon1') ) { tep_session_register('coupon1'); } ?> Then when you get to checkout_payment.php you just refer to it as $coupon1 and it will still have the value you set in checkout_shipping.php. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.