bonsoir,
J'ai modifié deux tables, il me reste une table, j'ai suivi le même processus pourtant ça ne fonctionne pas.
Voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?php
if (isset($_POST['submit']))
{ $id_pers=htmlentities(trim($_POST['id_pers']));
  $nom_pers=htmlentities(trim($_POST['nom_pers']));
  $prenom_pers=htmlentities(trim($_POST['prenom_pers']));
  $sexe=htmlentities(trim($_POST['sexe']));
  $date_naiss=htmlentities(trim($_POST['date_naiss']));
  $num_tel=htmlentities(trim($_POST['num_tel']));
  $code_service=htmlentities(trim($_POST['code_service']));
  $username=htmlentities(trim($_POST['username']));
  $password=htmlentities(trim($_POST['password']));
  $type=htmlentities(trim($_POST['type']));
 if ($id_pers&&$nom_pers&&$prenom_pers&&$sexe&&$date_naiss&&$num_tel&&$code_service&&$username&&$password&&$type){
	 //Crypter le password ;*/
    $password=md5($password);
	//Se connecter à la BDD
    $connect=mysql_connect('localhost','root','') or die(Error);
    mysql_select_db('bdd__messagerie'); //sélectionner BDD
 
	$mod_pers=mysql_query("SELECT * FROM personne WHERE id_pers='$id_pers'")or die(mysql_error());
 
	$query=mysql_query("UPDATE personne SET id_pers=$id_pers,nom_pers=$nom_pers,prenom_pers=$prenom_pers,sexe=$sexe,date_naiss=$date_naiss,num_tel=$num_tel,code_service=$code_service,login=$username,password=$password,type=$type WHERE id_pers=$id_pers"); //Requête sql
	die("Le Compte a ete modifie <a href='Administrateur_page.php'>retour</a>"); 
 
	}else die("Veuillez saisir tous les champs"); 
}
?>
Vous pouvez m'aidez SVP?
Merci