Bonjour à tous,
je voudrais afficher les différents contact de ma banque voici le code utilise :
<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en"
"
http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd ">
<html xmlns= "
http://www.w3.org/1999/xhtml " xml/lang="fr"
lang="fr"
<head>
<title>banque</title>
<META HTTP-equiv="content-type"
content="text/html, charset=utf-8"/>
</head>
<?php
require_once('includes/templategc.php');
require_once('includes/magicquotes.inc.php');
require_once('includes/bd.inc.php');
$NumBanque = mysqli_real_escape_string($lien, $_GET['NumBanque']);
$resultat
mysqli_query($lien, "select NumBanque, Enseigne, NomAgence, AdrBanque, CpBQ, VilleBq, Tel, Fax from bdbanques where NumBanque '$NumBanque'");
$bdbanques = array();
while ($ligne = mysqli_fetch_array($resultat))
{
$bdbanques[]= array('NumBanque' => $ligne ['NumBanque'], 'Enseigne' => $ligne ['Enseigne'],'NomAgence' => $ligne ['NomAgence'],'AdrBanque' => $ligne ['AdrBanque'],'CpBQ' => $ligne ['CpBQ'],'VilleBq' => $ligne ['VilleBq'],'Tel' => $ligne ['Tel'],'Fax' => $ligne ['Fax']);
}
$resultat1
mysqli_query($lien, "select NumContact, NumBanque, StatutCont, NomCont, PreCont, TelCont, EmailCont, MobileCont from bdcontactsbanques where NumBanque '$NumBanque'");
$bdcontactsbanques = array();
while ($ligne = mysqli_fetch_array($resultat1))
{
$bdcontactsbanques[]= array('NumContact' => $ligne ['NumContact'], 'NumBanque' => $ligne ['NumBanque'] , 'StatutCont' => $ligne ['StatutCont'], 'NomCont' => $ligne ['NomCont'], 'PreCont' => $ligne ['PreCont'], 'TelCont' => $ligne ['TelCont'], 'EmailCont' => $ligne ['EmailCont'], 'MobileCont' => $ligne ['MobileCont']);
}
?>
<?php foreach ($bdbanques as $banques): ?>
<form action="?" method="POST">
<!--debut de rounded box --> <!--debut de rounded box -->
<fieldset>
<label for ="NumBanque">Numéro :</label>
" />
<label for= "Enseigne">Enseigne :</label>
" />
<label for="NomAgence">Nom Agence :</label>
" />
<label for="AdrBanque">Adresse :</label>
<textarea name="AdrBanque" cols="17" rows="2" id="AdrBanque"><?php echo $banques['AdrBanque'];?></textarea>
<label for="CpBQ">Code postal</label> - <label for="VilleBq">Ville :</label>
" /> -
" />
<label for="Tel">Tel :</label>
" />
<label for="Fax">Fax :</label>
" />
</fieldset>
<!--fin de rounded box-->
<!--debut de rounded box -->
<fieldset>
Interlocuteurs et contacts
<?php echo "
Num |
Statut |
Nom |
Prénom |
télèphone |
Email |
Mobile |\" ; ?>
<?php foreach ($bdcontactsbanques as $contacts): ?>
<form action =\"CONSULTER\" method=\"POST\">
<?php echo \"----
" .htmlspecialchars($contacts['NumContact'], ENT_QUOTES, 'utf-8'). ", \" ; ?>
<?php echo \"" .htmlentities(htmlspecialchars($contacts['StatutCont'], ENT_QUOTES, 'utf-8')). ", \" ; ?>
<?php echo \"" .htmlspecialchars($contacts['NomCont'], ENT_QUOTES, 'utf-8'). ", \" ; ?>
<?php echo \"" .htmlspecialchars($contacts['PreCont'], ENT_QUOTES, 'utf-8'). ", \" ; ?>
<?php echo \"" .htmlspecialchars($contacts['EmailCont'], ENT_QUOTES, 'utf-8'). ", \" ; ?>
<?php echo \"" .htmlspecialchars($contacts['MobileCont'], ENT_QUOTES, 'utf-8'). ", \" ; ?>
[listebanques.php ]
[majbanque.php?NumBanque=<?php echo $banques['NumBanque']; ?> ]
[printbanque.php?NumBanque=<?php echo $banques['NumBanque']; ?> ]
<!--fin de btns -->
<!--fin de wrapper -->
</form>
<?php include('majbanque.php'); ?>
<?php
pied();
?>
</html>
lorsque j'ouvre ma page voici le message d'erreur que j'ai :
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Program Files\EasyPHP-5.3.3\www\gescompt\modifbanque.php on line 26
je ne comprends pas pourquoi ???
quelqu'un peux t il 'aider ???
merci d'avance
Aurélie
Afficher la suite