Call to a member function execute() on boolean
Résolu
iamlouky
Messages postés
15
Date d'inscription
Statut
Membre
Dernière intervention
-
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
jordane45 Messages postés 38486 Date d'inscription Statut Modérateur Dernière intervention -
Bonjour,
Je suis entrain de mettre unen ligne, et il y a ce problème qui se pose :
Voici mon code :
Je suis entrain de mettre unen ligne, et il y a ce problème qui se pose :
- Fatal error: Uncaught Error: Call to a member function execute() on boolean in /storage/ssd3/068/4295068/public_html/authentification/transfert4.php:46 Stack trace: #0 {main} thrown in /storage/ssd3/068/4295068/public_html/authentification/transfert4.php on line 46**
Voici mon code :
<?php
// à mettre tout en haut du fichier .php, cette fonction propre à PHP servira à maintenir la $_SESSION
session_start();
include("config.php");
$error = false;
$adminpageError = "";
$code4Error = "";
$code4noncorrespondError = "";
if (isset($_SESSION['username']) && $_SESSION['username'] =="admin") {
$adminpageError = "<p><a href='inscription.php'>Admin page </a></p>";
}
if(isset($_POST['valider'])){
if (empty($_POST['code'])) {
$error = true;
$codetransfert4Error = "Please enter the transfer code .";
} else {
$code4 = htmlentities($_POST['code4'], ENT_QUOTES, "ISO-8859-1");
$mysqli = mysqli_connect("localhost", "id4295068_roomadmin", "", "id4295068_projet");
if (!$mysqli) {
echo "Please check your information and try again";
} else {
$query = "SELECT * FROM `client6` WHERE code4='".$code4."'";
$result = mysqli_query($mysqli,$query) or die(mysqli_error());
$rows = mysqli_num_rows($result);
if($rows==1) {
header("location: load4.php");
} else {
$query = "SELECT * FROM `client6` WHERE code4='".$code4."'";
$result = mysqli_query($mysqli,$query) or die(mysqli_error());
$rows = mysqli_num_rows($result);
if($rows==0) {
header("location: transfert4non.php");
}
}
}
}
}
// Si tout va bien, on peut continuer
// On récupère tout le contenu de la table client6
$req = $mysqli->prepare('SELECT * FROM `client6` WHERE username = :username');
$req->execute(array('username' => $_SESSION['username']));
// On affiche chaque entrée une à une
while ($donnees = $req->fetch())
A voir également:
- Hpy call solver
- Hpy instant gaming - Forum Vos droits sur internet
- Est-ce que le site Instant gaming est fiable ? ✓ - Forum Jeux vidéo
- Call solver - Forum Bureautique
- Call identifier 2.08 - Télécharger - Téléphonie & Visio
- Call Of Duty 4 iw3mp.exe - Forum Jeux vidéo