$field_first_name = $_POST["first_name"]; $first_name_ok = "yes"; } if ($email == "") { $incomplet_email = "<br/><span class='warning'>Email can't be blank</span>"; } elseif ($validation_mail == 'no') { $incomplet_email = "<br/><span class='warning'>Email already in use</span>"; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $incomplet_email = "<br/><span class='warning'>Invalide Email</span>"; } else { $field_email = $_POST["email"]; $email_ok = "yes"; } if ($last_name_ok === "yes" & $first_name_ok == "yes" & $email_ok == "yes") { $non_fb = 1; if (GET_telephone()) { if ($telephone_ok == "yes") { $insertsql = "INSERT INTO {$table} (first_name, last_name, email, telephone, non_fb) \n\t\t\t\t\tVALUES ( :first_name, :last_name, :email, :telephone, :non_fb)"; $insertstmnt = $conn->prepare($insertsql); $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':email' => $email, ':telephone' => $telephone, ':non_fb' => $non_fb); $insertstmnt->execute($params); } } else { $insertsql = "INSERT INTO {$table} (first_name, last_name, email, non_fb) \n\t\t\t\tVALUES ( :first_name, :last_name, :email, :non_fb)"; $insertstmnt = $conn->prepare($insertsql); $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':email' => $email, ':non_fb' => $non_fb); $insertstmnt->execute($params); } $valid_forum = "yes"; } } else {
<?php require "../functions.php"; $tely = GET_telephone(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>NON-FB</title> <link href="css/reset.css" rel="stylesheet" type="text/css" media="screen"/> <link href="css/style.css" rel="stylesheet" type="text/css" media="screen"/> </head> <body> <div id="container_formulaire"> <div id="content_formulaire"> <form method="POST" action="index_sent.php?send=yes" name="inscription"> <div id="field_first_name"> FIRST NAME<br /> <input name="first_name" id="first_name"/> </div> <div id="field_last_name"> LAST NAME<br /> <input name="last_name" id="last_name" /> </div> <?php