Prob : Récuperer des valeurs à partir d'une liste

gssk Messages postés 24 Date d'inscription mercredi 1 décembre 2004 Statut Membre Dernière intervention 28 août 2008 - 9 mai 2005 à 11:27
malalam Messages postés 10839 Date d'inscription lundi 24 février 2003 Statut Membre Dernière intervention 2 mars 2010 - 9 mai 2005 à 12:39
Je n'arrive pas à recuper une valeur à partir d'un id seclectioné ds une liste, l'erreur est sur le mysql_fetch_array (en rouge)


est ce que qqun pourrait m'aider?

Merci d'avance !!!!



<?php

$cnx = mysql_connect('localhost','root','');

mysql_select_db('admin',$cnx);

?>

<html>

<head>

<title>Membres</title>

</head>



<center>

Modifier Membre


<table>

<tr>

<td>Numéro Membre</td>

<td>

<?php

$query="SELECT * FROM membre";

$result = mysql_query($query);


echo '<FORM name=retour method="POST"
action=update_dans_membre.php>';

echo '<select name="idM">';

//tant qu'il ya des fichiers

while ($val = mysql_fetch_array($result))

{


echo '"<option
value="'.$val["idM"].'">'.$val["idM"].'</option>"';

}

echo '</select> ';

?>

</td>

</tr>

<?php

$req="SELECT * FROM membre where idM =".$val["idM"];

$result = mysql_query($req);

while ($data = mysql_fetch_array($result))

{

?>

<tr>

<tr>

<td>
Votre Nom </td>

<td>


<?php

echo '';

?>.....

<?php

}

?>......

1 réponse

malalam Messages postés 10839 Date d'inscription lundi 24 février 2003 Statut Membre Dernière intervention 2 mars 2010 25
9 mai 2005 à 12:39
Hello,



si ton champ idM n'est pas de type numerique :


$req="SELECT * FROM membre where idM ='".$val["idM"]"'";
0
Rejoignez-nous