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 49 50 51 52
|
<?php include("../theme/admin/info_header.php"); ?>
<?php include("../theme/admin/menu_info_admin.php"); ?>
<?php include("../theme/admin/subheader_user.php");?>
$id=$_GET['id'];
$nom=$_POST['nom'];
$Sql = "SELECT employe_id,nom_user,prenom_user,naissence_user,adresse_user FROM users WHERE user_id = '".$id."'";
$req = mysql_query($Sql);
if( mysql_num_rows($req) > 0 )
{
while( $res = mysql_fetch_assoc($req))
{
echo "<form method = post action =''>";
echo 'Nom';
echo '<br>';
echo '<input name="nom" type="text" size="30" class="inputbox" value='.$res['user_nom'].'>';
echo '<br>';
echo '<input value="Modifier" name="B1" style="border: 1px solid rgb(0, 0, 0); padding: 3px 7px;" type="submit"/>';
echo "</form>";
/**après jai mis une codition pour changer le nom si il a eu une modification :**/
if (isset($_POST['nom']) != $res['nom_empl'] ){
mysql_query("UPDATE employe SET nom_empl = '$nom' where employe_id = $id ");
echo "<br>";
echo "donnée mis a jours appuyé sur info employé pour rafrechir";
}
}
} |
Partager