Jump to content

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 = 'hgghg@yahoo.com';
  $subject = 'Someone just Registered .';
  $headers = 'From: me@.com';
  $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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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