Albatross Posted February 22, 2007 Share Posted February 22, 2007 Mornin all! I have a html form application that gets processed by some php code, returns a result page to the applicant, stores the info in a db, and emails myself and another person. The problem I have is that when I get the email, I see the domain server email addy, not the registered domain. (ex : bob@webhostprovider.com instead of molly@retribution.com) (both are techincally correct but I want my paid domain used....not the default webhost domain. Based on the code below, is there a way I can change it so that I get the domain that I want? $inputfield00=@($_POST['name']); $inputfield01=@($_POST['history']); $inputfield02=@($_POST['recruiting']); $inputfield03=@($_POST['email']); $inputfield04=@($_POST['im']); $inputfield05=@($_POST['charname']); $inputfield06=@($_POST['charage']); $inputfield07=@($_POST['bio']); $inputfield08=@($_POST['strengths']); $inputfield09=@($_POST['whatship']); $inputfield10=@($_POST['responsibilities']); $inputfield11=@($_POST['sample']); $mailto="me@domain.com"; $mysubject="Application for '$_POST[name]'."; $mail = 'An application requires your review.: Message: '.$message.' Field 1: '.$inputfield00.' Field 2: '.$inputfield01.' Field 3'.$inputfield02.' Field 4 '.$inputfield03.' Field 5 '.$inputfield04.' Field 6'.$inputfield05.' Field 7'.$inputfield06.' Field 8'.$inputfield07.' Field 9'.$inputfield08.' Field 10'.$inputfield09.' Field 11'.$inputfield010.' Field 12'.$inputfield11; $header .= "Application"; mail($mailto, $mysubject, $mail, $header); ?> (This is all of the mailer code.) Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 22, 2007 Share Posted February 22, 2007 $header = 'From: Bob <bob@domain.com>'; Quote Link to comment Share on other sites More sharing options...
heckenschutze Posted February 22, 2007 Share Posted February 22, 2007 whats with the overuse of the error supressing operator!?!!? Quote Link to comment Share on other sites More sharing options...
Albatross Posted February 22, 2007 Author Share Posted February 22, 2007 To be honest, it's what I started with way back when and it worked......so I kept using it. If you know of a better, cleaner way, I am truly all ears. (Copy/pasting the same code across sheets is a pain in the backside....believe me) Quote Link to comment Share on other sites More sharing options...
heckenschutze Posted February 22, 2007 Share Posted February 22, 2007 well for example: $inputfield00 = ((array_key_exists('name', $_POST)) ? $_POST['name'] : "my default value"); *nb: parenthesis added for ease of reading Quote Link to comment 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.