i need to make something and i don't know if its possible with php.
i want to make a form and when submited the form details to go automatically to an e-mail.
is this possible? and if yes how exactly?
thank you in advance
Moderator: General Moderators
this one?PHP Parse error: parse error, unexpected T_VARIABLE in blablabla on line 8
? If you want to concatenate the string please read http://www.php.net/manual/en/language.o ... string.php$Title$First_name$Last_name$Email
Code: Select all
<?php
...
print_r($_POST);
@extract($_POST);
...
?>Code: Select all
<?php
function stripPOST($elemName)
{
if (!isset($_POST[$elemName]) || strlen($_POST[$elemName]) == 0)
die($elemName . ' not set');
else
return stripslashes($_POST[$elemName]);
}
$Title = stripPOST('Title');
$First_name = stripPOST('First_name');
$Last_name = stripPOST('Last_name');
$Email = stripPOST('Email');
$Message = "The form has been filled out by ". $Title . $First_name . $Last_name . $job_title . $Username . $Email . $Password . $Confirm_Password . $Title2 . $First_name2 . $Last_name2 . $Job_title2 . $Email2 . $Company_name;
mail ('mail@hotmail.com',"Form submitted", $message);
?>Code: Select all
mail ("mail@hotmail.com","Form submitted", $message);