Forum Moderators: coopster
Here's part of the code:
----------------------------------------------------
if (!($Lien = mySql_connect("****", "****", ""))){
exit();
}
if (!(mySql_select_db("cargo",$Lien)))
{
exit();
}
$requete="SELECT id FROM transporteurs WHERE Nom_entre='$entreprise' ORDER BY 'id' DESC ";
$Resultat = mySql_query($requete,$Lien);
if (!($Resultat)) {
if (mySql_errno() == 1062){
redirect("usagerno.php?entreprise=$entreprise");
}else{
redirect("wrong.php?message1=$mess1&message2=$mess2&message3=$mess3&entreprise=$entreprise");
}
}
$num=$Resultat;
echo($num);
the problem is that $Resultat is a resource identifier and not the data per se, so you have to add a step and use the function mysql_fetch_array() [ca2.php.net] to retrieve the data.
Bonne chance.
mavherick
[added]too slow! What WBF said![/added]