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
| <?php
$SAISIE=$_POST['nom'];
//REQUETE 1 - VERIFICATION SI DATE SAISIE EST VALIDE
$connexion=mysql_connect('localhost','-','-') or die ('impossible de se connecter, veuillez ré-essayer');
$db = mysql_select_db('intranet', $connexion) or die ('La base de données ne peut pas être sélectionnée');
if($connexion)
{
$query="SELECT * FROM fichier WHERE date='".$SAISIE."'";
}
$result=mysql_query($query);
if(mysql_num_rows($result) == 1)
{
header("location:intranet2.php?page=RechercheDocDate1"); //DATE VALIDE
}
else
{
header("location:intranet2.php?page=RechercheDocDate2"); //DATE INVALIDE
}
break;
}
}
?> |