[php-html] envoi de donnees
gandalf
-
gandalf -
gandalf -
Bonjour,
Dans quels cas on n'arrive pas a transmettre des données??
J'ai une feuille avec un <form>, mes <input>, et rien n'arrive sur ma feuille action.
Comment se fait-ce?
merci pour vos recherches d'explications!
voici quand meme mon code
<html>
<body>
<div align="center" style="color: purple"><br><br><br><br><b><h2>IDENTIFICATION</h2></b></div>
<table align="center">
<form method="post" action="verif.php"> <tr><td>
<tr><td>
<input type="text" value="Nom" name="nom" size="20" maxlength="40" onfocus="value=''">
</td><td>
<input type="text" value="Prenom" name="prenom" size="20" maxlength="40" onfocus="value=''">
</td><td>
<input type="text" value="Password" name="mdp" size="10" maxlength="20" onfocus="value=''">
</td></tr>
<tr><td colspan="3" align="center"><BR><BR><BR><input type="submit" align="middle" value="VALIDATION">
</form> </td></tr></table>
</body>
</html>
/////////////// et ma page verif.php
<?php
$nom= $_POST['nom'];
$prenom=$_POST['prenom'];
$mdp=$_POST['mdp'];
echo "NPM ".$nom.$prenom.$mdp; ///////////ca c'est pour verifier l'absence des POST
if ((isset($_POST['nom']))and(isset($_POST['prenom']))and (isset($_POST['mdp'])))
{
$requete="select * from responsables where nom ='$nom' and prenom='$prenom' and mdp='$mdp'";
$result=mysql_query($requete,$cnx);
$val=mysql_num_rows($result);
if ($val>=1)
etc......
Dans quels cas on n'arrive pas a transmettre des données??
J'ai une feuille avec un <form>, mes <input>, et rien n'arrive sur ma feuille action.
Comment se fait-ce?
merci pour vos recherches d'explications!
voici quand meme mon code
<html>
<body>
<div align="center" style="color: purple"><br><br><br><br><b><h2>IDENTIFICATION</h2></b></div>
<table align="center">
<form method="post" action="verif.php"> <tr><td>
<tr><td>
<input type="text" value="Nom" name="nom" size="20" maxlength="40" onfocus="value=''">
</td><td>
<input type="text" value="Prenom" name="prenom" size="20" maxlength="40" onfocus="value=''">
</td><td>
<input type="text" value="Password" name="mdp" size="10" maxlength="20" onfocus="value=''">
</td></tr>
<tr><td colspan="3" align="center"><BR><BR><BR><input type="submit" align="middle" value="VALIDATION">
</form> </td></tr></table>
</body>
</html>
/////////////// et ma page verif.php
<?php
$nom= $_POST['nom'];
$prenom=$_POST['prenom'];
$mdp=$_POST['mdp'];
echo "NPM ".$nom.$prenom.$mdp; ///////////ca c'est pour verifier l'absence des POST
if ((isset($_POST['nom']))and(isset($_POST['prenom']))and (isset($_POST['mdp'])))
{
$requete="select * from responsables where nom ='$nom' and prenom='$prenom' and mdp='$mdp'";
$result=mysql_query($requete,$cnx);
$val=mysql_num_rows($result);
if ($val>=1)
etc......