$sql = "SELECT $choice FROM Member WHERE username = '$_SESSION[username]'"; $result = mysql_query($sql);Which will not work, it should find a percentage, but it always comes back with 1?!
I'm sure the problem is that i am searching primarily by $choice which is obviously a variable. Because when i search manually by editing the code from $choice to one of rows i get the right answer.
I'm trying loads of different ways of getting the data into an array but it always come out with the value 1.
And lastly, in attempts to solve the problem, i have echo'ed $choice and it has came out how it supposed to be, so no problems there.
I am trying to
$row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo "$row[$choice]";and all i get is 1.
What am I doing wrong?!