des champs vides
Posté : 04 nov. 2011, 14:26
Bonjour,
je sais pas pourquoi ma requête ça marche pas,si quelqu'un peut en jeter un coup d’œil sera très gentil
Ps:il me retourne que le premier champ :Num Affectation,le reste vide
je sais pas pourquoi ma requête ça marche pas,si quelqu'un peut en jeter un coup d’œil sera très gentil
Ps:il me retourne que le premier champ :Num Affectation,le reste vide
<?php
$id_aff=0;
if(isset($_GET['id_aff']) && !empty($_GET['id_aff']))
{
$id_aff=$_GET['id_aff'];
}
$sql='select * from affectation where id_aff=".$id_aff." ';
$req=mysql_query($sql) or die(mysql_error());;
$data=mysql_fetch_assoc($req);
//echo $sql;
?>
<div align="center">
<table width="375">
<form name="motif_aff" method="post" action="?do=db_aff_modif&id=22&id_aff=<? echo $id_aff ?>" onsubmit="return control_saisie();">
<tr>
<td align="left">Num Affectation</td>
<td align="left"><input type="text" name="id_aff" size="25" value="<? echo $id_aff ?>"/></td>
</tr>
<tr>
<td align="left">liste</td>
<td align="left"><input type="text" name="liste" size="25" value="<? echo $data['liste'] ?>"/></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="modifier" value="Modifier" />
</div></td>
</tr>
</form>
</table>
</div>