Javascript alert php result
<p>First of all sorry im a really big beginner</p>

<p>I have a bit of a problem</p>

<p>i have a mysql query what select data from my users </p>

<pre><code>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 '&lt;div id="reader"&gt;'.$vv.'&lt;/div&gt;';
</code></pre>

<p>so it selects tom is a reader, the reader field contains yes or no, i echo it out it says yes, thats ok.</p>

<p>and i would like to alert this value with javascript.</p>

<p>i added an id reader</p>

<p>the  javascript</p>

<pre><code>&lt;script&gt;
var readers = document.getElementById("reader"); 
        alert(readers.value);



&lt;/script&gt;
</code></pre>

<p>and im keep getting an alert window undefined.</p>

<p>could please someone point me to te right path what im missing? and is it possible to alert the value this way?</p>
