par
Cyrano » 14 déc. 2005, 16:09
Bon, on va commencer par simplifier un peu le code :
<?php
$erreur = (isset($_GET['erreur'])) ? $_GET['erreur'] : "";
?>
<form action="verif-form.php" method="post" name="id" enctype="multipart/form-data">
<table width="460" border="0" summary="" cellpadding="0" cellspacing="0" bgcolor="#FFFFCC">
<tr>
<td align="right" height="35"><b>* Titre : </b></td>
<td>
<input type="text" name="titre" size="35" maxlength="256" value="<?php echo ($erreur=="correction") ? $_POST['titre'] : null;?>">
<?php
echo (($erreur=="correction") && ($_POST['titre']=="")) ? '<font color="#ff0000" size=2"> Champs obligatoire</font>' : null;
?>
</td>
</tr>
<input type="submit" value="Visualisez" name="id">
Ensuite, il faudrait voir le code te ton script de validation : si des "/" sont ajoutés, ce n'est pas de la génération spontanée: c'est que dans ton code il y a une ligne qui les ajoute.
Bon, on va commencer par simplifier un peu le code :
[php]<?php
$erreur = (isset($_GET['erreur'])) ? $_GET['erreur'] : "";
?>
<form action="verif-form.php" method="post" name="id" enctype="multipart/form-data">
<table width="460" border="0" summary="" cellpadding="0" cellspacing="0" bgcolor="#FFFFCC">
<tr>
<td align="right" height="35"><b>* Titre : </b></td>
<td>
<input type="text" name="titre" size="35" maxlength="256" value="<?php echo ($erreur=="correction") ? $_POST['titre'] : null;?>">
<?php
echo (($erreur=="correction") && ($_POST['titre']=="")) ? '<font color="#ff0000" size=2"> Champs obligatoire</font>' : null;
?>
</td>
</tr>
<input type="submit" value="Visualisez" name="id">[/php]
Ensuite, il faudrait voir le code te ton script de validation : si des "/" sont ajoutés, ce n'est pas de la génération spontanée: c'est que dans ton code il y a une ligne qui les ajoute.