[PHP]
Résolu
LeHigh
Messages postés
109
Date d'inscription
Statut
Membre
Dernière intervention
-
LeHigh Messages postés 109 Date d'inscription Statut Membre Dernière intervention -
LeHigh Messages postés 109 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
j'ai un problème sur le site dont je corriger des bugs, j'ai un tableau ou j'affiche ou j'affiche les infos souhaitées (screen), mais j'ai rajouter le champ adresse ip, le problème c'est que les adresses ip s'affichent mais ce ne sont pas les bonnes.
http://www.noelshack.com/voir/130309/img1038835.JPG
Le Code:
echo '<table width="100%" border=1 cellspacing=0>';
while ($ligne = mysql_fetch_array ($res))
{
$ref = $ligne[0];
$num_m = $ligne[1];
$service = $ligne [2];
$unite = $ligne[3];
$nom = $ligne[4];
$ref_uc = $ligne[7];
$mrk_uc = $ligne[16];
$tp_uc = $ligne[17];
$adrip = $ligne[15];
//Selection du libellé long pour la marque de l'UC
if ($mrk_uc != "") {
$req2="SELECT lbl_long_marque FROM marque WHERE lbl_court_marque = '".$mrk_uc."'";
$res2=mysql_query($req2);
while ($ligne = mysql_fetch_array ($res2)) {
$marque = $ligne[0];
}
}
if ($adrip != "") {
$req10="SELECT ip FROM ip WHERE ref_ip = '".$adrip."'";
$res10=mysql_query($req10);
while ($ligne = mysql_fetch_array ($res10)) {
$adrip = $ligne[0];
}
}
//Selection du libellé long pour le type de l'UC
if ($tp_uc != "") {
$req3="SELECT lbl_long_type FROM type_uc WHERE lbl_long_type = '".$tp_uc."' || lbl_court_type = '".$tp_uc."'";
$res3=mysql_query($req3);
while ($ligne = mysql_fetch_array ($res3)) {
$type = $ligne[0];
}
}
//Affichage de la ligne correspondant à un micro
echo '<tr class="fondblanc_txtbleu12">';
echo '<td align="center" width="3%"><input type="radio" name="select" value="'.$ref.'"></td>';
echo '<td width="13.5%">'.empti($num_m).'</td>';
echo '<td width="13.5%">'.empti($marque).'</td>';
echo '<td width="13.5%">'.empti($type).'</td>';
echo '<td width="13.5%">'.empti($nom).'</td>';
echo '<td width="13.5%">'.empti($service).'</td>';
echo '<td width="13.5%">'.empti($unite).'</td>';
echo '<td width="13.5%">'.empti($adrip).'</td></tr>';
}
echo '</table>';
echo '</td></tr>';
echo '<tr><td height="20"></td></tr>';
echo '<tr><td align="center"><input type="submit" value=" Voir ">    <input type="button" value=" Retour " onclick="javascript:parent.frames[\'body\'].window.location=\'body.php\';"></td></tr>';
echo '</table>';
quelqu'un saurait il pourquoi et pourrait m'aider ?
Et si vous avez besoin d'autres éléments demander moi ^^
j'ai un problème sur le site dont je corriger des bugs, j'ai un tableau ou j'affiche ou j'affiche les infos souhaitées (screen), mais j'ai rajouter le champ adresse ip, le problème c'est que les adresses ip s'affichent mais ce ne sont pas les bonnes.
http://www.noelshack.com/voir/130309/img1038835.JPG
Le Code:
echo '<table width="100%" border=1 cellspacing=0>';
while ($ligne = mysql_fetch_array ($res))
{
$ref = $ligne[0];
$num_m = $ligne[1];
$service = $ligne [2];
$unite = $ligne[3];
$nom = $ligne[4];
$ref_uc = $ligne[7];
$mrk_uc = $ligne[16];
$tp_uc = $ligne[17];
$adrip = $ligne[15];
//Selection du libellé long pour la marque de l'UC
if ($mrk_uc != "") {
$req2="SELECT lbl_long_marque FROM marque WHERE lbl_court_marque = '".$mrk_uc."'";
$res2=mysql_query($req2);
while ($ligne = mysql_fetch_array ($res2)) {
$marque = $ligne[0];
}
}
if ($adrip != "") {
$req10="SELECT ip FROM ip WHERE ref_ip = '".$adrip."'";
$res10=mysql_query($req10);
while ($ligne = mysql_fetch_array ($res10)) {
$adrip = $ligne[0];
}
}
//Selection du libellé long pour le type de l'UC
if ($tp_uc != "") {
$req3="SELECT lbl_long_type FROM type_uc WHERE lbl_long_type = '".$tp_uc."' || lbl_court_type = '".$tp_uc."'";
$res3=mysql_query($req3);
while ($ligne = mysql_fetch_array ($res3)) {
$type = $ligne[0];
}
}
//Affichage de la ligne correspondant à un micro
echo '<tr class="fondblanc_txtbleu12">';
echo '<td align="center" width="3%"><input type="radio" name="select" value="'.$ref.'"></td>';
echo '<td width="13.5%">'.empti($num_m).'</td>';
echo '<td width="13.5%">'.empti($marque).'</td>';
echo '<td width="13.5%">'.empti($type).'</td>';
echo '<td width="13.5%">'.empti($nom).'</td>';
echo '<td width="13.5%">'.empti($service).'</td>';
echo '<td width="13.5%">'.empti($unite).'</td>';
echo '<td width="13.5%">'.empti($adrip).'</td></tr>';
}
echo '</table>';
echo '</td></tr>';
echo '<tr><td height="20"></td></tr>';
echo '<tr><td align="center"><input type="submit" value=" Voir ">    <input type="button" value=" Retour " onclick="javascript:parent.frames[\'body\'].window.location=\'body.php\';"></td></tr>';
echo '</table>';
quelqu'un saurait il pourquoi et pourrait m'aider ?
Et si vous avez besoin d'autres éléments demander moi ^^
A voir également:
- [PHP]
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP