jermaindefoe Posted November 21, 2009 Share Posted November 21, 2009 I have a variable called total price tat i need to send to the other page, how can i , on the click of a button and using post send this value and change to the new page? something like this...? <form action = "postage.php" method = "POST"> <center><input type = "submit" value = "procceed to checkout" name= "grandT"></center> <form> Link to comment https://forums.phpfreaks.com/topic/182407-html-php-post/ Share on other sites More sharing options...
waynew Posted November 21, 2009 Share Posted November 21, 2009 Use a hidden field: <form action = "postage.php" method = "POST"> <input name="total_price" type="hidden" value="<?php echo $total_price; ?>" /> <center> <input type = "submit" value = "procceed to checkout" name= "grandT"> </center> <form> But bear in mind that you will have to check to see if $_POST['total_price'] is the correct price (on postage.php) as users could tamper with the form values before submitting it. Link to comment https://forums.phpfreaks.com/topic/182407-html-php-post/#findComment-962625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.