Jump to content

gibson

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gibson's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok, thanks very much, Ill try it out now No error came up this time, now Ill just have to wait and see if the emails arrive. Ill reply later to tell you if its worked or not. Thanks again for your help
  2. This now comes up when you click the submit button: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: parse error, unexpected T_VARIABLE in /web/sites/320/gerrygibson/www.gerrygibson.f2s.com/submit2.php on line 15[/quote]
  3. Well this hasnt worked. I didnt receive any emails at all this time, not even the email with the information from the form which was the part that was working. It loads the page whenever I click the submit button without any problems so it looks as if it has worked, but I never got any emails. I have played about with the code and still it hasnt worked. Have you got any ideas of what could be wrong with it?
  4. Thank you, Ill try this out and Ill get back to you about whether it has worked. I tried something similar before but it was coming up an error but maybe I was just making a mistake in the syntax or something, so Ill try this code and hopefully itll work for me.
  5. Hello, I am very new to PHP, in fact I really dont have a clue about the coding but I know I need to use it. I am building a website using Dreamweaver and want to have a form so a customer can contact me. The following is the HTML for the form I am using to play about with to try and get it working: [code]<form name="form1" method="post" action="submit.php">   <label>Name   <input name="name" type="text" id="name">   </label>   <p>     <label>Email     <input name="email" type="text" id="email">     </label>   </p>   <p>     <label>Message:<br>     <textarea name="message" cols="50" rows="4" id="message"></textarea>     </label>   </p>   <p>     <center><label>     <input type="submit" name="Submit" value="Submit">     </label>       <label>          <input type="reset" name="Submit2" value="Reset">     </label>     </center>   </p> </form>[/code] I found some PHP code on a website which allows me to send what is inputted in the form to my email address and this is it below: [code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <p>   <?php $to="email removed for privacy reasons"; $subject="Mail from your website"; $from="FROM: ".$_POST['name']." <".$_POST['email'].">\n"; $message="This message is from the website. Name: ".$_POST['name']." Email: ".$_POST['email']." Message: ".$_POST['message']; //Now to actually send it mail($to, $subject, $message, $from); ?> </p> <p>Thank you for contacting us. We will get back to you within two business days.</p> </body> </html>[/code] This code is working fine but it only sends me an email with what was inputted, I would also like the customer to be sent an email to tell them that I have received their query and will get back to them within two business days. Would you be able to tell me what code I would have to use for this? It would be going to the email that they have inputted and will be from my email with a subject of something like 'Thank you for contacting us' and then the message would be something like 'Thank you for contacting us. We will get back to you within two business days' Thanks for any help you can give me
×
×
  • 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.