slt,
j'ai pas bien compri ta solution, je met ou l'intiation: $provisoire = 0;
en fait voila mon code complet ; la premiere partie, la premier fois je rentre dans le formuliare de recherche et donc mon chekbox prend la valeur $provisoire mai el n'est pas connue?; quand j'active la recherche id=1 et donc $_POST['provisoire'] est connue ! il faut mattre une variable ki change si chekbox est coché ou pas?:
if (isset ($_GET['id'])){
/*Debut test recherche*/
if (empty($_POST['inseeagt'])){
echo "mon insee".$_POST['inseeagt']."<br>";
echo "mon nom".$_POST['nomagt']."<br>";
//if (empty($_POST['exterieur']) or empty($_POST['nomagt']) or empty($_POST['prenomagt'])) {
if (empty($_POST['provisoire']) or empty($_POST['nomagt'])) {
echo "mon nom+++".$_POST['nomagt']."<br>";
echo "ma case".$_POST['provisoire']."<br>";
//Afficher informations manquantes
echo "<font size='4'><em><strong>ATENTION VOUS DEVEZ INFORMER L'NSEE ou PROVISOIRE ET NOM</strong></em></font>";
}
}
elseif(!empty($_POST['provisoire'])){
echo "ma case".$_POST['provisoire'];
echo "<font size='4'><em><strong>ATENTION LE DOSSIER N4EST PAS PROVISOIRE POUR L'INSTANT, VEUILLEZ DECOCHER LA CASE</strong></em></font>";
?>
<form name="Precedent" method="post" action="BIsejsporrach.php">
<input type="button" value="précédent" onclick="history.go(-1)" />
</form>
<?php
//avec le lien
//<a href="javascript:void(0)" onclick="history.go(-1)>Précédent</a>
//ou <a href="ton ancienne page.php">Précédent</a>
exit();
}
}/*Fin test recherche*/
//Si ce n'est pas la recuperantion d'infos de l'agent
if (!isset($_POST['agtinscris'])){
/*Debut test recup d'infos*/
//Si je n'ai aucune information; afficher le formulaire de recherche
if (!isset($_POST['inseeagt']) and !isset($_POST['exterieur']) and !isset($_POST['nomagt']) and !isset( $_POST['prenomagt'])) {
//Afficher Formulaire de recherche
?>
<form name="recherche" method="post" action="BIsejsporrach.php?id=1">
<table width="401" height="145" border="0" >
<tr>
<td width="200"><b>Exterieur</b></td>
<td width="200">
<INPUT TYPE="radio" NAME="exterieur" VALUE="NON" CHECKED>NON
<INPUT TYPE="radio" NAME="exterieur" VALUE="OUI">OUI
</td>
<td width="200"><b>Provisoire</b></td>
<td width="200">
<input name="provisoire" type="checkbox" value='<?=$provisoire ?>'>
</td>
</tr>
<tr>
<tr>
<td width="200"><b>Numéro d'Identification INSEE</b></td>
<td width="200">
<input name="inseeagt" type="text" value="" size="30" maxlength="30">
</td>
</tr>
<tr>
<td width="200"><b>Nom<b></td>
<td width="400" >
<input name="nomagt" type="text" size="30" maxlength="40">
</td>
<td width="200"><b>Prenom<b></td>
<td width="400" >
<input name="prenomagt" type="text" value='' size="20" maxlength="30">
</td>
</tr>
<tr>
<td width="200"><b><b></td>
<td width="200">
</legend> <input name="Rechercher" type="submit" value="Rechercher"></td>
</tr>
</table>
</form>
<?php
exit();
}/*Fin afficher formulaire de recherche*/
}/*Fin test recup d'infos*/