[php] Erreur fatale : Types d'opérandes non supportés

Solved
Hello
On the following script, I get this error:
Fatal error: Unsupported operand types in ... online8
The script consists of retrieving the number present in the counter field in the visits table and adding one to it...

<?php mysql_connect("sql.free.fr","****","***"); mysql_select_db("codg82"); $requete="SELECT * from visites"; $result=mysql_query($requete); $compteur=mysql_fetch_array($result); $nombre=$compteur+1; $requete1="UPDATE visites SET compteur='$nombre' WHERE compteur='$compteur'"; $result1=mysql_query($requete1); echo "We have already had $nombre visitors on the telenote service"; mysql_close(); ?>


Thank you in advance
--
It's strange, we learn every day even when we don't keep ourselves informed!!!!
Configuration: motherboard asus k8n4e, processor: sempron 3300+, hard drive 80go memory: 512...

9 answers

  1. I can't say, I don't know how your code is put together; it's rather worrying that you don't know why such and such variable is in your session; it doesn't smell reliable (don't put it into production, especially if it's a sensitive application)
    --

    PhP  
    There are 10 types of people in the world: those who understand binary and the others...
    -2