Contact Us

Posted By: Matt McGloin
08/06/2010 - 11:07pm

Body

<?php // Change the 4 variables below $yourName = 'Cosmic Book News'; $yourEmail = [email protected]'; $yourSubject = 'Contact Us'; $referringPage = 'https://www.cosmicbooknews.com/Contact'; // No need to edit below unless you really want to. It's using a simple php mail() function. Use your own if you want function cleanPosUrl ($str) { return stripslashes($str); } if ( isset($_POST['sendContactEmail']) ) { $to = $yourEmail; $subject = $yourSubject.': '.$_POST['posRegard']; $message = cleanPosUrl($_POST['posText']); $headers = "From: ".cleanPosUrl($_POST['posName'])." <".$_POST['posEmail'].">\r\n"; $headers .= 'To: '.$yourName.' <'.$yourEmail.'>'."\r\n"; $mailit = mail($to,$subject,$message,$headers); if ( @$mailit ) { header('Location: '.$referringPage.'?success=true'); } else { header('Location: '.$referringPage.'?error=true'); } } ?>

- Privacy Policy

- Terms Of Use

About The Author:

editorm101's picture
About: Matt McGloin
Founder of Cosmic Book News. Producer. Journalist. Wendell Vaughn is Quasar. Richard Rider is Nova.

Topics:

Keep updated with the Cosmic Book News Community on Facebook

Comments: