hostfreak Posted July 18, 2006 Share Posted July 18, 2006 I had a page where the user filled out a form and submitted the information which was then sent via an email and displayed a confirmation of the information they submitted. Well it came about that I needed that information to also be added to the database so instead of using a submit button for the email and using another page for the action of the email, I just had the email sent from that page. Well in doing so, I am unsure how to display the confirmation (just the confirmation alone) with out the form they filled out being displayed as well. See when I was using a different page for the action to send the email, I was able to echo the results for them to print etc. Now I can echo the result with $result = mysql_query($query) then display the confirmation but it also displays the form under it which I don't want. Anyways, any help would be appreciated, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/14954-advice-needed/ Share on other sites More sharing options...
pixy Posted July 18, 2006 Share Posted July 18, 2006 After you use echo() or print () to show the message, include the footers (whatever stuff you have at the bottom of all pages and use die(); or exit(); Quote Link to comment https://forums.phpfreaks.com/topic/14954-advice-needed/#findComment-60010 Share on other sites More sharing options...
wildteen88 Posted July 18, 2006 Share Posted July 18, 2006 Rather than using die or exit, Do something like this:[code=php:0]if(isset($_POST['submit'])){ // do email stuff here}else{ // display form here}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/14954-advice-needed/#findComment-60015 Share on other sites More sharing options...
pixy Posted July 18, 2006 Share Posted July 18, 2006 ^ I usually do that too. :D Whenever I have a really long code I hate having to go back and re-tab everything so it lines up. XD Quote Link to comment https://forums.phpfreaks.com/topic/14954-advice-needed/#findComment-60020 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.