Notice: Undefined variable
Bonjour à tous,
je débute en PHP mon problème parait simple mais je n'arrive pas à le resoudre:
Code:
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
|
<html>
<head>
<title>Mon premier PHP </title>
</head>
<body>
<FORM ACTION="p3-inscription.php?subject=Essai formulaire leçon 8" METHOD="GET" ENTYPE="text/plain">
<P align="left">
Veuillez entrer votre mot de passe :
<INPUT TYPE="PASSWORD" NAME="pass" SIZE="9">
<BR>
Votre Nom :
<INPUT TYPE="text" NAME="nom" SIZE="8" >
<BR>
<INPUT TYPE="SUBMIT" VALUE="Soumettre">
</FORM>
</body>
<?php
if ($nom <> "")
{
echo "Merci de vous être inscrit, " , $nom;
header('Location: p4-page suivante.php');
}
?>
</html> |
lorsque j'exécute ce code j'ai:
Notice: Undefined variable: nom in E:\SitesPHP\site1\p3-inscription.php on line 28
La variable n'est $nom n'est pas connu alors que je l'ai dans des balise input :
<INPUT TYPE="text" NAME="nom" SIZE="8" >
Merci pour votre aide.