Pb php
StresS
-
StresS -
StresS -
Bonjour, mon pb est cette erreur :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/vhosts/xxxx/annub.php on line 96
et le code php est :
if(isset($_POST['activite']))
{
$activite = htmlentities($_POST['activite']);
}
elseif(isset($_GET['activite']))
{
$activite = htmlentities($_GET['activite']);
}
$activite3 = "&activite=".$activite;
if(isset($_POST['nom']) XOR isset($_GET['nom']))
{
if(isset($_POST['nom']))
{
$nom = htmlentities($_POST['nom']);
}
elseif(isset($_GET['nom']))
{
$nom = htmlentities($_GET['nom']);
}
$nom2 = " AND noment='".$nom."'";
$nom3 = "&noment=".$nom;
}
else
{
$nom2 = "";
$nom3 = "";
}
if(isset($_POST['ville']) XOR isset($_GET['ville']))
{
if(isset($_POST['ville']))
{
$ville = htmlentities($_POST['ville']);
}
elseif(isset($_GET['ville']))
{
$ville = htmlentities($_GET['ville']);
}
$ville2 = " AND ville='".$ville."'";
$ville3 = "&ville=".$ville;
}
else
{
$ville2 = "";
$ville3 = "";
}
if(isset($_POST['postal']) XOR isset($_GET['postal']))
{
if(isset($_POST['postal']))
{
$postal = htmlentities($_POST['postal']);
}
elseif(isset($_GET['postal']))
{
$postal = htmlentities($_GET['postal']);
}
$postal2 = " AND postal='".$postal."'";
$postal3 = "&postal=".$postal;
}
else
{
$postal2 = "";
$postal3 = "";
}
if(isset($_POST['dep']) XOR isset($_GET['dep']))
{
if(isset($_POST['dep']))
{
$dep = htmlentities($_POST['dep']);
}
elseif(isset($_GET['dep']))
{
$dep = htmlentities($_GET['dep']);
}
$dep2 = " AND dep='".$dep."'";
$dep3 = "&dep=".$dep;
}
else
{
$dep2 = "";
$dep3 = "";
}
include "connect.php";
$nombreDeMessagesParPage = "8";
$retour = mysql_query("SELECT COUNT(*) AS nb_id FROM produit WHERE activite='".$activite."'".$nom2.$ville2.$postal2.$dep2."");
$donnees = mysql_fetch_array($retour);
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/vhosts/xxxx/annub.php on line 96
et le code php est :
if(isset($_POST['activite']))
{
$activite = htmlentities($_POST['activite']);
}
elseif(isset($_GET['activite']))
{
$activite = htmlentities($_GET['activite']);
}
$activite3 = "&activite=".$activite;
if(isset($_POST['nom']) XOR isset($_GET['nom']))
{
if(isset($_POST['nom']))
{
$nom = htmlentities($_POST['nom']);
}
elseif(isset($_GET['nom']))
{
$nom = htmlentities($_GET['nom']);
}
$nom2 = " AND noment='".$nom."'";
$nom3 = "&noment=".$nom;
}
else
{
$nom2 = "";
$nom3 = "";
}
if(isset($_POST['ville']) XOR isset($_GET['ville']))
{
if(isset($_POST['ville']))
{
$ville = htmlentities($_POST['ville']);
}
elseif(isset($_GET['ville']))
{
$ville = htmlentities($_GET['ville']);
}
$ville2 = " AND ville='".$ville."'";
$ville3 = "&ville=".$ville;
}
else
{
$ville2 = "";
$ville3 = "";
}
if(isset($_POST['postal']) XOR isset($_GET['postal']))
{
if(isset($_POST['postal']))
{
$postal = htmlentities($_POST['postal']);
}
elseif(isset($_GET['postal']))
{
$postal = htmlentities($_GET['postal']);
}
$postal2 = " AND postal='".$postal."'";
$postal3 = "&postal=".$postal;
}
else
{
$postal2 = "";
$postal3 = "";
}
if(isset($_POST['dep']) XOR isset($_GET['dep']))
{
if(isset($_POST['dep']))
{
$dep = htmlentities($_POST['dep']);
}
elseif(isset($_GET['dep']))
{
$dep = htmlentities($_GET['dep']);
}
$dep2 = " AND dep='".$dep."'";
$dep3 = "&dep=".$dep;
}
else
{
$dep2 = "";
$dep3 = "";
}
include "connect.php";
$nombreDeMessagesParPage = "8";
$retour = mysql_query("SELECT COUNT(*) AS nb_id FROM produit WHERE activite='".$activite."'".$nom2.$ville2.$postal2.$dep2."");
$donnees = mysql_fetch_array($retour);
A voir également:
- Pb 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