bri0987 Posted October 25, 2007 Share Posted October 25, 2007 I have a page: customize.php The page has two submit buttons using CSS to give them an image. <input type="submit" name="AddToCart" src="../images/customize_addcart.jpg" class="AddToCart" value="" alt="Add To Cart"> <input name="PriceUpdate" type="submit" class="PriceUpdate" value="" src="../images/customize_updateprice.jpg" alt="Add To Cart" /> At the top of the page. I have an IF STATEMENT that will determine which BUTTON has been clicked on. If the "AddToCart" button has been clicked > The information is sent to the Shopping cart and and page is redirected to cart.php using "header function" When the user clicks on the "PriceUpdate" button the page will recalculate the total price based on the selections from the POST variable... PROBLEM IS: Once the user clicks the "PriceUpdate" button - if they click on the refresh button on their browser window. A warning ALWAYS comes up saying: " The page can not be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page you were trying to view. " How can I make is so this message will not occur -OR- Bypass this message -OR- Just make it so that the Refresh button on the browser does not do anything if clicked. If anyone knows anything about this let me know. OR if you know of another way I should be doing things. Thanks All. Bri Quote Link to comment https://forums.phpfreaks.com/topic/74682-disabling-the-refresh-button-hmmmmm/ Share on other sites More sharing options...
teng84 Posted October 25, 2007 Share Posted October 25, 2007 you have to use redirect after all transaction to remove the post data eg sql insert or else everytime the refresh button is press it will perform db insertion or something like that Quote Link to comment https://forums.phpfreaks.com/topic/74682-disabling-the-refresh-button-hmmmmm/#findComment-377567 Share on other sites More sharing options...
bri0987 Posted October 25, 2007 Author Share Posted October 25, 2007 teng84 <<< Can you please explain this more to me. I dont quite understand. Quote Link to comment https://forums.phpfreaks.com/topic/74682-disabling-the-refresh-button-hmmmmm/#findComment-377605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.