Jump to content

help needed


whizzykid

Recommended Posts

Hi, i have this code for call back form.but i want the content of the form to come my email address.hw can i do that?

this is my code

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO `Call Back form` (Firstname, LastName, `Company Name`, `Phone Number`, `Brief Comments`) VALUES (%s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['Firstname'], "text"),
                       GetSQLValueString($_POST['LastName'], "text"),
                       GetSQLValueString($_POST['Company_Name'], "text"),
                       GetSQLValueString($_POST['Phone_Number'], "int"),
                       GetSQLValueString($_POST['Brief_Comments'], "text"));

  mysql_select_db($database_inteecom_ellen, $inteecom_ellen);
  $Result1 = mysql_query($insertSQL, $inteecom_ellen) or die(mysql_error());

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/158447-help-needed/
Share on other sites

Oh yea i did that but it still doesnt send the content of the form.this my code

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO `Call Back form` (Firstname, LastName, `Company Name`, `Phone Number`) VALUES (%s, %s, %s, %s)",
                       GetSQLValueString($_POST['Firstname'], "text"),
                       GetSQLValueString($_POST['LastName'], "text"),
                       GetSQLValueString($_POST['Company_Name'], "text"),
                       GetSQLValueString($_POST['Phone_Number'], "int"));

  mysql_select_db($database_inteecom_ellen, $inteecom_ellen);
  $Result1 = mysql_query($insertSQL, $inteecom_ellen) or die(mysql_error());
  $youremailaddress = '[email protected]';
  $subject = 'Someone just Registered .';
  $headers = 'From: [email protected]';
  $from = "some1 just registered";
  $message = ' some1 just registered check it out.';
mail($youremailaddress, $subject,$from,$headers, $message);

Link to comment
https://forums.phpfreaks.com/topic/158447-help-needed/#findComment-835632
Share on other sites

Oh yea i did that but it still doesnt send the content of the form.this my code

  $message = ' some1 just registered check it out.';
mail($youremailaddress, $subject,$from,$headers, $message);

 

Why would it.. it sends what you tell it to send.. you have choosen to send

some1 just registered check it out.

So thats what it sends

try this!

  $message = $_POST['Firstname'].' just registered check it out.';

Link to comment
https://forums.phpfreaks.com/topic/158447-help-needed/#findComment-835945
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.