0

below are my codes working perfectly. I would to display message in $confirm variable after operation just for a short while, meaning it should be disappear after some seconds. Help please to do that.

 <?php
 if (!empty ($_POST['submit']) AND $_POST['submit'] == 'Sauvegarder')
 {
 include_once('upag_mysql.php');
$name = mysqli_real_escape_string($conn,$_POST['nom']);
$username=mysqli_real_escape_string($conn, $_POST['username']);
 $sql = "INSERT INTO utilisateur VALUES ('', '".$name."',  
'".$username."', '".$password."',  '".$role."', '".$mail."')";
$res = mysqli_query($conn, $sql);

echo '<p style="text-align:center">Un utilisateur a ete ajoute avec    
succes !</p>';
}
else
{
 echo $confirm='';
 }
?>
<form action="" method="post" > 
<label>Nom <em>*</em></label>
<input type="text" name="nom" required /></br></br>
<label>username<em>*</em></label>
<input type="text" name="username" required /></br></br>
<input type="submit" id="submit" name="submit" value="Sauvegarder"  />
</form> 

Thanks the link receive help me. But i would like to prevent the message to display after the page reloading, just only after hitting the submit button..

bappro
  • 11
  • 2
  • What have you already tried to achive your goal? – PAlphen Dec 19 '15 at 16:50
  • i Have found this due the link sent to me // How to avoid this message display again after refreshing the page ? – bappro Dec 19 '15 at 16:58

0 Answers0