A voir également:
- Textfield html
- Editeur html - Télécharger - HTML
- Espace html ✓ - Forum HTML
- [**] Balise pour un espace vide en hml. Merci ✓ - Forum Webmastering
- /Var/www/html/index.html ✓ - Forum Linux / Unix
- Html download - Télécharger - HTML
2 réponses
C'est un peu n'importe quoi ton formulaire ...
Tu m'expliqueras comment on peut cocher un champ texte, et à quoi sert la balise <label> vide ...
Et le code PHP :
Tu m'expliqueras comment on peut cocher un champ texte, et à quoi sert la balise <label> vide ...
<form method="post" action=""> <p> <label for="champ1">Champ 1 :</label> <input type="text" name="champ1" id="champ1" <?php if(isset($_POST['champ1'])) echo 'value="'.$_POST['champ1'].'" '; ?>/> </p> <p> <input type="submit" value="Envoyer" /> </p> </form>
Et le code PHP :
<?php if(isset($_POST['champ1'])) echo $_POST['champ1']; ?>
<body>
<form id="form1" name="form1" method="post" >
<input type="text" name="textfield" />
<label>
<input type="submit" name="Submit" value="Envoyer" />
</label>
</form>
<?php
$x=$_POST['textfield'];
if (isset($_POST['Submit']))
{
switch($_POST['Submit']){
case "Envoyer": echo $x;
break;
}
}
?>
</body
<form id="form1" name="form1" method="post" >
<input type="text" name="textfield" />
<label>
<input type="submit" name="Submit" value="Envoyer" />
</label>
</form>
<?php
$x=$_POST['textfield'];
if (isset($_POST['Submit']))
{
switch($_POST['Submit']){
case "Envoyer": echo $x;
break;
}
}
?>
</body