Aide sur php
lagrand
-
totoyo47 Messages postés 260 Date d'inscription Statut Membre Dernière intervention -
totoyo47 Messages postés 260 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
je un problème sur mon code. quant j’exécute il ne reconnait pas le query du ligne 26.
il me dit ceux-ci: ( ! ) Fatal error: Call to a member function query() on a non-object in C:\wamp\www\AVOCAT\TP\index.php on line 26
VOILA LE code:
<html><head>
<link rel="stylesheet" type="text/css" href="connect.css">
</head>
<body class="body1">
<?php
include('connect.php');
if(isset($_GET['delid'])){
$Reponse=$pdo->query('select * FROM dossier WHERE ID ='.$_GET['delid']);
while ($donnees1 = $querya->fetch())
{
echo '<section class="confirmation"> <div class="texte">voulez vous suprimer '.$donnees1[1].' ! </div><a href="?adelid='.$donnees1[0].'"><div class="oui">oui</div><a href="?d='.$donnees1[0].'"><div class="non">non</div></a> </section>';
}}if(isset($_GET['mod'])){
$querya = $bd_name->query('select * FROM dossier WHERE ID ='.$_GET['mod']);
while ($donnees1 = $querya->fetch())
{
echo '<section class="modification2"> <div class="texte">voulez vous modifier '.$donnees1[1].' </div><a href="modification.php?mod='.$donnees1[0].'"><div class="oui">oui</div><a href="?d='.$donnees1[0].'"><div class="non">non</div></a> </section>';
}}
if(isset($_GET['adelid'])){
$querya = $bd_name->query("DELETE FROM dossier WHERE ID =".$_GET['adelid']);
}
$Reponse = $bd_name->query('SELECT * FROM dossier ');
?>
<img class="logo" src="avocat1.jpg" />
<a href="ajoutdossier.php"> <section class="dossier" > NOUVEAU DOSSIER</section></a>
<table class="table" border=1 align="center" style=" box">
<tr class="menu">
<td class="td1">N°</td>
<td class="td2">Reference</td>
<td class="td3">Parties</td>
<td class="td3">Statut</td>
<td class="td3">Diligence</td>
<td colspan=3 align="center">Action</td>
</tr>
<?php
while ($donnees = $reponse->fetch())
{
?>
<tr class="colonne">
<td><?php echo $donnees[0]?></td>
<td><?php echo $donnees[1]?></td>
<td><?php echo $donnees[2]?></td>
<a href="detailsdossier.php?detailid='.$donnees[0].'"><div><td class="detail"><?php echo '<img src="detail.png" /><a href="detailsdossier.php?detailid='.$donnees[0].'">Details<a/>'?></td></div></a><td class="supression"><?php echo '<img src="poubelle.png" /><a href="?delid='.$donnees[0].'">Supression<a/>'?></td><td class="modification"><?php echo '<img src="modif2.png" /><a href="?mod='.$donnees[0].'">modification<a/>'?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
Merci d'avance!!!
je un problème sur mon code. quant j’exécute il ne reconnait pas le query du ligne 26.
il me dit ceux-ci: ( ! ) Fatal error: Call to a member function query() on a non-object in C:\wamp\www\AVOCAT\TP\index.php on line 26
VOILA LE code:
<html><head>
<link rel="stylesheet" type="text/css" href="connect.css">
</head>
<body class="body1">
<?php
include('connect.php');
if(isset($_GET['delid'])){
$Reponse=$pdo->query('select * FROM dossier WHERE ID ='.$_GET['delid']);
while ($donnees1 = $querya->fetch())
{
echo '<section class="confirmation"> <div class="texte">voulez vous suprimer '.$donnees1[1].' ! </div><a href="?adelid='.$donnees1[0].'"><div class="oui">oui</div><a href="?d='.$donnees1[0].'"><div class="non">non</div></a> </section>';
}}if(isset($_GET['mod'])){
$querya = $bd_name->query('select * FROM dossier WHERE ID ='.$_GET['mod']);
while ($donnees1 = $querya->fetch())
{
echo '<section class="modification2"> <div class="texte">voulez vous modifier '.$donnees1[1].' </div><a href="modification.php?mod='.$donnees1[0].'"><div class="oui">oui</div><a href="?d='.$donnees1[0].'"><div class="non">non</div></a> </section>';
}}
if(isset($_GET['adelid'])){
$querya = $bd_name->query("DELETE FROM dossier WHERE ID =".$_GET['adelid']);
}
$Reponse = $bd_name->query('SELECT * FROM dossier ');
?>
<img class="logo" src="avocat1.jpg" />
<a href="ajoutdossier.php"> <section class="dossier" > NOUVEAU DOSSIER</section></a>
<table class="table" border=1 align="center" style=" box">
<tr class="menu">
<td class="td1">N°</td>
<td class="td2">Reference</td>
<td class="td3">Parties</td>
<td class="td3">Statut</td>
<td class="td3">Diligence</td>
<td colspan=3 align="center">Action</td>
</tr>
<?php
while ($donnees = $reponse->fetch())
{
?>
<tr class="colonne">
<td><?php echo $donnees[0]?></td>
<td><?php echo $donnees[1]?></td>
<td><?php echo $donnees[2]?></td>
<a href="detailsdossier.php?detailid='.$donnees[0].'"><div><td class="detail"><?php echo '<img src="detail.png" /><a href="detailsdossier.php?detailid='.$donnees[0].'">Details<a/>'?></td></div></a><td class="supression"><?php echo '<img src="poubelle.png" /><a href="?delid='.$donnees[0].'">Supression<a/>'?></td><td class="modification"><?php echo '<img src="modif2.png" /><a href="?mod='.$donnees[0].'">modification<a/>'?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
Merci d'avance!!!
A voir également:
- Aide sur 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