$getscores=$DB_site->query("SELECT score1,score2,score3,score4 FROM user WHERE userid=$bbuserinfo[userid]"); $1=$getscores['score1']; $2=$getscores['score2']; $3=$getscores['score3']; $4=$getscores['score4']; $total=$1+$2+$3+$4;