I added the php form but its not working.
"php file"

<?php
$message = '';
$to			  = "zeee76@gmail.com";
$from         = $_POST['email'];

$message .='
<b>name 		= </b> '.$_POST['name'].'<br />
<b>email     		= </b> '.$_POST['email'].'<br />
<b>company			= </b> '.$_POST['company'].'<br />
<b>telephone 		= </b> '.$_POST['telephone'].'<br />
';

$Mail_header  = "Content-type: text/html\n";
$Mail_header .= "From:".$_POST['name']."<$from> \n";

mail($to, $subject, $body, $Mail_header);

header("Location:thanks.html");
?>

Html source ( Online can be seen here) Thanks for helping me

<table width="541" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="23" colspan="6" valign="top"><p class="style1">Call us a for FREE QUOTE</p></td>
  </tr>
  <tr>
    <td width="106" height="15"></td>
    <td width="153"></td>
    <td width="11"></td>
    <td width="41"></td>
    <td width="43"></td>
    <td width="187"></td>
  </tr>
  <tr>
    <td height="24" valign="top"><span class="style3">Contact Person </span></td>
    <td colspan="2" valign="top"><form id="form1" name="form1" method="post" action="">
      <label for="textfield"></label>
      <input type="text" name="name" id="name" />
    </form></td>
    <td colspan="2" valign="top" class="style3">Email</td>
    <td valign="top"><form id="form2" name="form2" method="post" action="">
      <label for="label"></label>
      <input type="text" name="email" id="label" />
    </form></td>
  </tr>
  <tr>
    <td height="23" valign="top" class="style3">Company</td>
    <td colspan="2" valign="top"><form id="form3" name="form3" method="post" action="">
      <label for="label2"></label>
      <input type="text" name="company" id="label2" />
    </form></td>
    <td colspan="2" valign="top" class="style3">Telephone</td>
    <td valign="top"><form id="form4" name="form4" method="post" action="">
      <label for="label3"></label>
      <input type="text" name="telephone" id="label3" />
    </form></td>
  </tr>
  <tr>
    <td height="22"></td>
    <td></td>
    <td colspan="2" valign="top"><form id="form5" name="form5" method="post" action="">
      <label for="Submit"></label>
      <input name="submit" type="submit" class="box" id="submit" value="Submit" />
    </form></td>
    <td>&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td height="9"></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>

Recommended Answers

All 2 Replies

Member Avatar for tie372

Make sure your webhost account allows you to send e-mail through php. This is the problem I initially faced.

I dont see an "action" in the html form ! When is your php script getting called ? And why do you have different forms for different form variables ?!?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.