1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$test=$_POST['mail'];
$test_fichier = strtr($test,
'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ',
'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy');
$test_fichier1=str_replace(' ','',$test_fichier);
$profession=$_POST['profession'];
$poste1=$_POST['poste'];
$date1=$_POST['date'];
$departement=$_POST['departement'];
mysql_select_db($database_connexion, $connexion);
$query_Recordset6 = "SELECT * FROM candidats WHERE compte_candidat = 'inscription' and mail_candidat = '$test_fichier1' ";
$Recordset6 = mysql_query($query_Recordset6, $connexion) or die(mysql_error());
$row_Recordset6 = mysql_fetch_assoc($Recordset6);
$totalRows_Recordset6 = mysql_num_rows($Recordset6);
if ($totalRows_Recordset6 > '0')
{
$message ='1';
}
else if ($_POST['profession'] == 'nul')
{
$message ='2';
}
else
{
$expire = 365*24*3600;
setcookie("profession_candidat",$profession,time()+$expire);
setcookie("poste_candidat",$poste1,time()+$expire);
setcookie("date_candidat",$date1,time()+$expire);
setcookie("mail_candidat",$test_fichier1,time()+$expire);
setcookie("mobilite_candidat",$departement,time()+$expire);
$insertGoTo = "creation-compte-candidat.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
} |
Partager