Rodney Posted January 19, 2008 Share Posted January 19, 2008 .....I have sendmail.php..... ...everything works good.... echo("Thank you for your interest, your e-mail was sent."); .....how would I add code to re-direct to a certain page after sucsessfull submission...? ....like... ...http://www.afbawindgap.org/active_member/AFBA_Active_Members.php... .....Thank you for you time... Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/ Share on other sites More sharing options...
avo Posted January 19, 2008 Share Posted January 19, 2008 Hi You could use a header re-direct like header ('location:/active_member/AFBA_Active_Members.php') or a meta redirect <meta http-equiv="REFRESH" content="0;url=<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com">"> Hope this helps Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443689 Share on other sites More sharing options...
Rodney Posted January 19, 2008 Author Share Posted January 19, 2008 .....like this.....? ....I saw that on the PhP array page but didn't try it cuz I confuse easy.... <?php @extract($_POST); $name = stripslashes($name); $email = stripslashes($email); $subject = stripslashes($subject); $text = stripslashes($text); mail('[email protected]',$subject,$text,"From: $name <$email>"); echo("Thank you for your interest, your e-mail was sent."); header ('location:/active_member/AFBA_Active_Members.php') ?> Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443698 Share on other sites More sharing options...
revraz Posted January 19, 2008 Share Posted January 19, 2008 You can't use Header if you echo a statement out. Put the echo on the page where the header directs to instead. Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443701 Share on other sites More sharing options...
Rodney Posted January 19, 2008 Author Share Posted January 19, 2008 ....so I can make a fancy scmantzy successful.php to point at instead of the OEM "your e-mail was sent"......? <?php @extract($_POST); $name = stripslashes($name); $email = stripslashes($email); $subject = stripslashes($subject); $text = stripslashes($text); mail('[email protected]',$subject,$text,"From: $name <$email>"); header ('location:/active_member/successful.php') ?> Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443715 Share on other sites More sharing options...
revraz Posted January 19, 2008 Share Posted January 19, 2008 That's what I would do. Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443717 Share on other sites More sharing options...
Rodney Posted January 19, 2008 Author Share Posted January 19, 2008 ....Have a Wonderful Day......! ....Thank You for your help....!! ......Rodney..... Link to comment https://forums.phpfreaks.com/topic/86812-hi-stumped-with-adding-code/#findComment-443721 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.