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
| <script>
$(document).ready(function(){
$('#valider').on('click', function() {
valid = true;
if($("#courriel").val() == ""){
$("#courriel").css("background", "#fba");
valid = false;
}
if($("#nom").val() == ""){
$("#nom").css("background", "#fba");
valid = false;
}
if($("#prenom").val() == ""){
$("#prenom").css("background", "#fba");
valid = false;
}
return valid;
})
});
</script>
<?php
$resultat = $bdd -> prepare('UPDATE information SET nom="'.$_POST['nom'].'", prenom="'.$_POST['prenom'].'", date_naissance="'.$d.'", sexe="'.$_POST['sexe'].'", rue="'.$_POST['rue'].'", codep="'.$_POST['codep'].'",ville="'.$_POST['ville'].'", departement="'.$_POST['departement'].'", region="'.$_POST['region'].'", pays="'.$_POST['pays'].'", tel_fixe="'.$_POST['tel_fixe'].'", tel_portable="'.$_POST['tel_portable'].'", courriel="'.$_POST['courriel'].'" ,recherche = "'.$_POST['recherche'].'", diplome = "'.$_POST['diplome'].'", projet = "'.$_POST['projet'].'", contrat = "'.$_POST['contrat'].'",
entrainer= "'.$_POST['entrainer'].'", club= "", rue_club = "", cp_club= "",
ville_club = "", dep_club = "", region_club = "",
pays_club = "", tel_fixe_club = "", tel_port_club= "",
taches = "", diplome_requis = "", contrat_requis = "", date_annonce=NOW() WHERE id_information = '.$_GET['id_information']. ' ');
if ($_POST['recherche'] == 1) {
if(isset($_POST['courriel']) AND $_POST['courriel'] != "" && isset($_POST['nom']) AND $_POST['nom'] != "" && isset($_POST['prenom']) AND $_POST['prenom'] != ""){
$resultat -> execute((array($_POST['nom'],$_POST['prenom'],$_POST['courriel']));
}
else{
$message='<div class="message_erreur">*Veuillez remplir tous les champs</div>';
}
}
?> |
Partager