Uploading email form to hosting server

by 7 replies
8
First time creating a contact form from scratch. It's all done. There's the html file and and there's .php file. I have them connected with "Action". I am using Dreamweaver.

So i upload both files to my server. Everything works except the submit button. It won't send the email.
Is it not connected properly?
#programming #email #form #hosting #server #uploading
  • man5,

    tought to tell without seeing the page. Give us an idea where the page is or post it in a code block.

    ttyl,
    WP4H
    • [1] reply
    • This is the HTML code

      <div id="Footer">
      <table width="391" height="40" border="0" cellpadding="1" cellspacing="1">
      <tr>
      <th height="38" scope="col"><table width="955" height="34" border="0" align="left" cellpadding="1" cellspacing="1">
      <tr>
      <th width="36" align="right" scope="col"><a href="http://www.facebook.com/update_security_info.php?wizard=1#!/profile.php?id=100001899947625"><img src="Images/facebook_widget.JPG" alt="facebook" width="26" height="26" hspace="5" border="0" /></a></th>
      <th width="32" scope="col"><a href="http://twitter.com/#!/Jdesignworld"><img src="Images/Twitter_widget.JPG" alt="twitter" width="32" height="26" border="0" /></a></th>
      <th width="58" scope="col"><a href="http://www.youtube.com/user/JDesignWorld"><img src="Images/youtube_widget.JPG" alt="youtube" width="57" height="26" border="0" /></a></th>
      <th width="816" scope="col">Copyright @ JDesignWorld! All rights reserved</th>
      </tr>
      </table></th>
      </tr>
      </table>
      </div>




      and PHP code

      <?php


      $to = "jdesignworld@hotmail.com"; //This is the email address you want to send the email to
      $subject_prefix = ""; //Use this if you want to have a prefix before the subject

      if(!isset($_GET['action']))
      {
      die("You must not access this page directly!"); //Just to stop people from visiting contact.php normally
      }

      /* Now lets trim up the input before sending it */

      $name = trim($_GET['name']); //The senders name
      $email = trim($_GET['email']); //The senders email address
      $subject = trim($_GET['subject']); //The senders subject
      $message = trim($_GET['msg']); //The senders message

      mail($to,$subject,$message,"From: ".$email.""); //a very simple send
      echo 'contactarea|Thank you '.$name.', your email has been sent.';

      ?>
  • you mentionned a form ? can't find it in the HTML you provided.

    WP4H
    • [1] reply
    • I ment contact form. This is a contact form.

      I uploaded it to the server and all but it's not letting me send email. So I am wondering if somehow it's not connected?
  • can you post the page *with* the contact form in it?

    WP4H
    • [1] reply
  • you need to change the action path depending upon the server path.

Next Topics on Trending Feed

  • 8

    First time creating a contact form from scratch. It's all done. There's the html file and and there's .php file. I have them connected with "Action". I am using Dreamweaver. So i upload both files to my server. Everything works except the submit button. It won't send the email.