affichage d'un combo chargé depuis la base
salut bon j'suis entrain developper une application web je me sers avec dreamWeaver et php et mysql c'est Bdd
bon j'ai une table qui s'appelle Client qui porte num_clt, nom_clt
bon j'ai creer avec dreamWeaver un jeu de cadre avec FRAMESET
Voila mon code
Index.html
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<!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=iso-8859-1" />
<title>index</title>
</head>
<frameset cols="20%, *" border="1">
<frame src="select_clt.php" name="g" />
<frame src="index1.html" name="d" />
</frameset><noframes></noframes>
</html> |
et
select_clt.php
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 27 28 29 30 31 32
|
<?php
$c=mysql_connect("localhost","root","");
mysql_select_db("gestion hebergement",$c);
echo '<html><head><meta http-equiv="Content-Language" content="ar-tn">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"><title>Inscription Client</title></head><body>
<form action="affichage_clt.php" method="post" target="d">
<p>Nom Client</p>
<p>
<select name="num_clt">
<option value="----" selected="selected">----</option>';
$sql="select * from client";
$req=mysql_query($sql);
while ($l=mysql_fetch_array($req))
{
extract($l);
echo"<option value=$num_clt>$nom_clt";
}
mysql_close();
echo'</select>
</p>
<p>
<input type="submit" name="Submit" value="Envoyer" />
</p>
</form>
</body>
</html>';
?> |
bon quand je valide select_clt.php le combo se charge avec du N°client
mais quand je valide apartir du l'index le select.clt_php se situe a gauche mais le probleme c'est le combo est vide :(
svp pourrez vous m'aidez sur Ca