First of all sorry im a really big beginner
I have a bit of a problem
i have a mysql query what select data from my users
the code looks like this
$r = mysql_query(" SELECT reader FROM users WHERE username = 'Tom' ") or die (mysql_error());
$result = mysql_fetch_array($r);
$vv = $result['reader'];
echo '<div id="reader">'.$vv.'</div>';
so it selects tom is a reader, the reader field contains yes or no, i echo it out it says yes, thats ok.
and i would like to alert this value with javascript.
i added an id reader
the javascript
<script>
var readers = document.getElementById("reader");
alert(readers.value);
</script>
and im keep getting an alert window undefined.
could please someone point me to te right path what im missing? and is it possible to alert the value this way?
console.login Firebug or Chrome console instead ofalert's.