bonjour je veux remplire un formulaire a partir d'une base de donnée alors je comence par mon premier probleme j'ai tous declaré et j'ai recupéré les resultat de ma requette et j'ai affecter chaque valeur a une variable alors j'ai eu le resultat suivante:
<?php
( isset($_GET['id']) );
{
$id = intval ($_GET['id']);
include ("connexion.php");
$req = "SELECT * FROM client WHERE id_client = ".$id;
$ret = mysql_query ($req) or die (mysql_error ());
$col = mysql_fetch_row ($ret);
$reqos = "SELECT os FROM os1 WHERE id_client = ".$id;
$retos = mysql_query ($reqos) or die (mysql_error ());
$tech = $col[1];
$nom = $col[3];
$adresse = $col[4];
$process = $col[10];
$ram = $col[11];
$cdrom = $col[12];
$Graveur = $col[13];
$dvd = $col[14];
jusqu'a maintenant tous marche bien pour les champ texte ça marche très bien j'ai fais:
<input name="tech" type="text" size="15" value="<? echo $tech ?>">
et pour les checkbox j'ai realisé ce dode mais ça marche pas
:
<? if ($cdrom == 'Oui')
{
echo '<input name="cdrom" type="checkbox" id="cdrom" value="Oui" checked>';
}
elseif ($cdrom == 'Non'){
echo '<input name="cdrom" type="checkbox" id="cdrom" value="Oui">';
}
?>
alors vous pouvez m'aidez???