Jump to content

nzGoner

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nzGoner's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. well... some part works! when i check my email, it says "nobody" instead of the senders email and it is not showing the right subject and the company field wont show up here is my html code thanks ~ Code here is my php Code <?php if(!$_POST) exit; $email = $_POST['email']; //$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS'; if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){ $error.="Invalid email address entered"; $errors=1; } if($errors==1) echo $error; else{ $values = array ('name','email','message'); $required = array('name','email','message'); $your_email = "gilbylu@gmail.com"; $email_subject = "New Message: ".$_POST['subject']; $email_content = "new message:\n"; foreach($values as $key => $value){ if(in_array($value,$required)){ if ($key != 'subject' && $key != 'company') { if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; } } $email_content .= $value.': '.$_POST[$value]."\n"; } } if(@mail($your_email,$email_subject,$email_content)) { echo 'Message sent!'; } else { echo 'ERROR!'; } } ?>
  2. nah, it is all good, i learnt alot from ya. ok now i figure some problem.... i recievied the email fine and works well but i click reply it shows sdfs@gamil.com Name: 222asdsa <E-Mail:> as in fulll i try modify $headers = "From: ".$name."<".$email.">\r\n"; to $headers = "From: ".$email."\r\n"; is that right? and i wana modify the $err = 'Message Sent Succesfully.'; do i just do it from there. i mean make the text go mid and insert a picture etc thanks~
  3. u make my day!! thanks man ... it works, i will try some more !! another thanks for u _b
  4. i did muck around with it before, is it to do with name=""? and i just add them myself before they only have <div class="h1"><input type="text" class="input1" value="Name: " /></div> this is what they look like before :S or textarea rows="40" class="textarea" cols="30" >Message:</textarea><br />
  5. its getting better but when i check my email geeez i am still researching ... man it is hard
  6. it is getting better, it appears on my mail box now... but i still dont see any message this is what it looks like and here is the code for the contact.php <?php $headers = "From: ".$name."<".$email.">\r\n"; mail($to,$subject,$message,$headers); $subject = 'Tour'; $name = $_POST['Name']; $email = $_POST['E-Mail']; $phone = $_POST['Phone']; $state = $_POST['State']; $message = $_POST['Message']."\r\n"; $to = "gilbylu@gmail.com"; $subject; foreach($_POST as $key=>$value) { $message .= $key.": ".$value."\n\r"; } mail($to,$subject,$message); ?> <html> <head> <title> Contact - Message Sent</title> <body> Message Sent Succesfully. </body> </html> and my html code <div id="content"> <div class="bg-cont png"> <div class="indent-main"> <div class="container"> <div class="col-1"> <div class="box"> <form action="contact.php" method="POST" id="form2"> <div class="indent-box"> <img alt="" src="images/6page_title1.gif" class="title1" /><br /> <div class="h1"><input type="text" class="input1" value="Name: " /></div> <div class="h1"><input type="text" class="input1" value="E-Mail: " /></div> <div class="h1"><input type="text" class="input1" value="Phone:" /></div> <div class="h1"><input type="text" class="input1" value="State:" /></div> <textarea rows="40" class="textarea" cols="30" value="Message:">Message:</textarea><br /> <input type="reset" value="reset" /> <input type="submit" value="submit" /> <div class="clear"></div> </div> </form> </div> thanks alot man :'(
  7. Hey ya, i have been trying and somehow it sent an email to my junk box and a message from nobody , cant see the message i type,no subjet, no email address
  8. sorry, it doesnt send me the email
  9. i bought this template and going well, but i am stuck with the contact page, i want the user to be able to fill the contact form and send it to my mailbox.. yes i have tried it myself and also build my own contact.php . But the template coding is a bit confusing for me i need some help please :'( <div id="content"> <div class="bg-cont png"> <div class="indent-main"> <div class="container"> <div class="col-1"> <div class="box"> <form action="" id="form2"> <div class="indent-box"> <img alt="" src="images/6page_title1.gif" class="title1" /><br /> <div class="h1"><input type="text" class="input1" value="Name: " /></div> <div class="h1"><input type="text" class="input1" value="E-Mail: " /></div> <div class="h1"><input type="text" class="input1" value="Phone:" /></div> <div class="h1"><input type="text" class="input1" value="State:" /></div> <textarea rows="40" class="textarea" cols="30" value="Message:">Message:</textarea><br /> <div class="fright"> <a href="#" class="link-1" onclick="document.getElementById('form2').reset()"><em><b>Reset</b></em></a> <div class="indent-2"><a href="#" class="link-1" onclick="document.getElementById('form2').submit()"><em><b>Send</b></em></a></div> </div> <div class="clear"></div> </div> </form> </div> so lets say i make a contact.php and i will change it to <form action="contact.php" id="form2"> how about this line: what should i replace with "a href?????? " <div class="fright"> <a href="#" class="link-1" onclick="document.getElementById('form2').reset()"><em><b>Reset</b></em></a> <div class="indent-2"><a href="#" class="link-1" onclick="document.getElementById('form2').submit()"><em><b>Send</b></em></a></div> and here is my contact.php page... it doesn't work properly <?php $name = $_POST['Name']; $email = $_POST['E-Mail']; $phone = $_POST['Phone']; $state = $_POST['State']; $Message = $_POST['Message']; $to = "gilbylu@gmail.com"; $subject; $message = ""; foreach($_POST as $key=>$value) { $message .= $key.": ".$value."\n\r"; } mail($to,$subject,$message); ?> <html> <head> <title> Contact - Message Sent</title> <body> Message Sent Succesfully. </body> </html> thanks ~
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.