Valeur pour un champ de formulaire
Bonjour,
J'ai un petit souci avec value ds le champ input name="noir" d'un formulaire.
Je voudrais afficher en gras une partie du mot salut ds ce champ
Il m'affiche : <B>sal</B>ut!
alors que je désire ceci salut!
Le formulaire s'appelle lui-même ds action="casesbiseffacer.php">
Si quelq'un pouvait m'aider, ce serait gentil
Voici le code:
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="casesbiseffacer.php">
<input name="noir" type="text" value = "<?php echo"<B>sal</B>ut!"; ?>" />
<input type="submit" name="button" id="button" value="Envoyer" />
<BR />
</form>
<?php
if(!isset ($_POST["noir"])) $_POST["noir"] = "";
$recep = $_POST["noir"];
echo $recep;
echo "<br>";
?>
</body>
</html> |