stijn0713 Posted August 18, 2012 Share Posted August 18, 2012 what happens when i put an submit button in an anchor? Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/ Share on other sites More sharing options...
Christian F. Posted August 18, 2012 Share Posted August 18, 2012 Unspecified behaviour, stemming from invalid HTML, so it depends upon the browser. The real question is, why would you do that? Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370414 Share on other sites More sharing options...
hakimserwa Posted August 18, 2012 Share Posted August 18, 2012 northing happens it depends on how you put it. i think its a matter of playing around with your button css. <button type="submit" name = "submit" value= "submit" style="background: none; border: none;"><span style="text-decoration: underline;">Styled text</span></button> Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370429 Share on other sites More sharing options...
stijn0713 Posted August 18, 2012 Author Share Posted August 18, 2012 i had a pagination class, where you customize the links a bit so i tried a submit button to go to the next page because i also need $_POST information before going to the next page... which will not work obviously Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370436 Share on other sites More sharing options...
Christian F. Posted August 18, 2012 Share Posted August 18, 2012 Save the result of the POSTed data in a temp location, give the saved data an ID, and then use the ID to retrieve it on the next page. Cache your data, in other words. Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370461 Share on other sites More sharing options...
hakimserwa Posted August 18, 2012 Share Posted August 18, 2012 maybe the session will then help Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370462 Share on other sites More sharing options...
Mahngiel Posted August 18, 2012 Share Posted August 18, 2012 if you're creating a multi-stage, multi-page form, you should make use of MySQL transactions. Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370468 Share on other sites More sharing options...
stijn0713 Posted August 18, 2012 Author Share Posted August 18, 2012 @mahngiel, what do you mean with multi stage multi page because it might be the case. I have a survey that i build up on a document survey.php i loop throught the questions going to the next like: survey.php?page=1 --> question 1 survey.php?page=2 --> question 2. Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370522 Share on other sites More sharing options...
Mahngiel Posted August 18, 2012 Share Posted August 18, 2012 @mahngiel, what do you mean with multi stage multi page because it might be the case. Several pages until completion with data that will be (eventually) submitted into the database at the end. However, if the user can abandon the form and come back later where they left off, you could a) insert into their table row after each question or b) provide a save button which uses the transaction Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1370523 Share on other sites More sharing options...
hakimserwa Posted August 31, 2012 Share Posted August 31, 2012 how to go about that? Quote Link to comment https://forums.phpfreaks.com/topic/267261-rooting-submit-button-in-anchor/#findComment-1374171 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.