kcotter Posted May 13, 2009 Share Posted May 13, 2009 when you don't fill out name and email.. it says go back and fill out name and email... but there's not back button... how can I put one in? I can't figure it out... here's the code...: I tried putting html in the page.. maybe bad idea... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body bgcolor="bed2ea"><font face=arial> <?php if (empty($_REQUEST['name']) || empty($_REQUEST['email'])) { print 'Please go back and Enter name and Email...';<html><a href="form.html">Back</a></html> } else { print "Thank you $name for registering to win!"; $name = "Name: ".$_REQUEST['name']."\n" ."Email: ".$_REQUEST['email']."\n" ."Address: ".$_REQUEST['address']."\n" ."City: ".$_REQUEST['city']."\n" ."State: ".$_REQUEST['state']."\n" ."Zip: ".$_REQUEST['zip']."\n" ."How they heard about us: ".$_REQUEST['hear']; mail("kalcotter1@yahoo.com", "Someone Registered at BuyWithoutDebt", $name, "From: BuyWithoutDebt@register.com\r\nReply-To: noreply@bwd.com\r\n"); } ?> </font> </body> </html> you can see what I'm talking about here if you want..click on the red star: http://www.continentalrto.com/buywithoutdebt/ thanks!!!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/ Share on other sites More sharing options...
MadTechie Posted May 13, 2009 Share Posted May 13, 2009 change print 'Please go back and Enter name and Email...';<html><a href="form.html">Back</a></html> to print 'Please go back and Enter name and Email...<a href="form.html">Back</a>'; Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/#findComment-832894 Share on other sites More sharing options...
kcotter Posted May 13, 2009 Author Share Posted May 13, 2009 perfect... that seemed easy.... ok. here's probably another easy one... after this part: "Thank you $name for registering to win!"; how would I put a close button???? thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/#findComment-832897 Share on other sites More sharing options...
gevans Posted May 13, 2009 Share Posted May 13, 2009 If you mean close the current browser window a little javascript will sort it for you. <?php print 'Thank you '.$name.' for registering to win! <a href="" onclick="window.close();return false;">close</a>'; Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/#findComment-832899 Share on other sites More sharing options...
MadTechie Posted May 13, 2009 Share Posted May 13, 2009 Sure (req. JS) change print "Thank you $name for registering to win!"; to print "Thank you $name for registering to win! <a href="javascript:window.close()">close me</a>"; Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/#findComment-832900 Share on other sites More sharing options...
kcotter Posted May 13, 2009 Author Share Posted May 13, 2009 PERFECT!!!! thanks guys!!! Damn this forum rocks!!! Quote Link to comment https://forums.phpfreaks.com/topic/157893-solved-back-button-on-php-mail-page-help/#findComment-832902 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.