paddy_fields Posted November 17, 2010 Share Posted November 17, 2010 Hello everyone, this is my first post here! My question covers a PHP, SQL, and HTML so I apologise if this isn't the appropriate section to post this message. Outline to my problem: A user can search my database for a variety of events, which are then listed on a results form. Next to each result I have an option to add this event to the users personal area as a 'saved event' for future reference. Currently I have a solution whereby an HTML form sends an action to '#', inserts the event ID and member ID into the 'savedevent' table via a PHP/SQL function. The page then displays 'event added'. THIS WORKS. However, if the user navigates away from the page, and then back to it again, the PHP script is obviously run again, ie- a 'resend data' dialog box is displayed to the user, which I really don't want. This website:http://www.bandsintown.com/event/3988178-nme-awards-tour-2011-london-united-kingdom-live-at-o2-academy-brixton-on-february-19-2011 achieves exactly what I am trying to do with the 'attending' button, but I cannot figure out how they accomplish this. Any help and ideas would be greatly appreciated. Hello again, and thanks! paddyfields. Quote Link to comment https://forums.phpfreaks.com/topic/218952-form-submit-problem/ Share on other sites More sharing options...
paddy_fields Posted November 17, 2010 Author Share Posted November 17, 2010 FYI: Solved with the use of if(isset($_POST['submit'])). Quote Link to comment https://forums.phpfreaks.com/topic/218952-form-submit-problem/#findComment-1135597 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.