javascript and php not quite working
<p>You can look at the application here: <a href="http://jsfiddle.net/YYMJS/6/" rel="nofollow">application</a></p>

<p>I know the code doesn't work in jsfiddle but I have included my code in the jsfiddle so that you can see the whole code and the way it is laid out.  <a href="http://jsfiddle.net/YYMJS/6/" rel="nofollow">jsfiddle</a></p>

<p>Now if textbox is empty, it displays "false" in alert and displays a message which is fine.</p>

<p>The problem though is this:</p>

<p>If I type the correct or incorrect room number value in the textbox, it always states it is "false" and does not come with a javascript message.</p>

<p>What should happen is if textbox value matches database, then it should alert "true" and display a javascript message "room is Valid", if textbox value doesn't match database then it should alert "False" and display a javascript message "room is Invalid" How can I achieve this?</p>

<p>You can test the application, enter in these figures in the textbox if you wish for testing:</p>

<p>Valid room number CW5/10 , Invalid room number CN2/10.</p>

<p>Below is where error occurs:</p>

<pre><code> var js_var = [];
&lt;?php while($data = mysql_fetch_assoc($roomquery)){ ?&gt;
js_var.push(&lt;?php $data['roomChosen']; ?&gt;);
&lt;?php }?&gt;
</code></pre>

<p>Jsfiddle application url updated above</p>
