Search This Blog

Tuesday, July 26, 2011

PHP From to email � Checkbox group?

Ok so I want people to fill in a form and when they press submit it gets sent to my email address… Everything is working fine I just need to know how to make the checkbox appear in my email, the free script I used didn’t have any checkbox and I don’t know how to write them


Here’s my PHP code:





if(isset($_POST['email'])) {

// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "mymail";
$email_subject = "Un nouveau formulaire est rempli";

function died($error) {
// your error code can go here
echo "Il semble y avoir une erreur avec le formulaire que vous tentez d'envoyer.";
echo "Voici ces erreurs:.";
echo $error."";
echo "Merci de les corriger avant de tenter de renvoyer le formulaire.";
die();
}

// validation expected data exists
if(!isset($_POST['prenom']) ||
!isset($_POST['nom']) ||
!isset($_POST['sexe']) ||
!isset($_POST['telephone']) ||
!isset($_POST['email']) ||
!isset($_POST['experience'])) {
died('Il semble y avoir une erreur avec le formulaire que vous tentez d'envoyer.');
}

$prenom = $_POST['prenom']; // required
$nom = $_POST['nom']; // required
$sexe = $_POST['sexe']; // not required
$telephone = $_POST['telephone']; // not required
$email = $_POST['email']; // required
$experience = $_POST['experience']; // required

$error_message = "";
$email_exp = '/

No comments:

Post a Comment