Jquery Get Value Data From Table, If match show the textbox
<p>I have an JS code that the function is to show Textbox if value first textbox match.
like this :</p>

<pre><code>$(window).load(function(){
var myString = "&lt;?php echo $num; ?&gt;";
$('#secondinput').hide();

$("#firstinput").keyup(function () {
var value = $(this).val();
    if($(this).val().match(myString)) {
        $('#secondinput').show();
    } else {
        $('#secondinput').hide();
        $('#secondinput input[type="text"]').val("");
    }
});

});
</code></pre>

<p>Now I integrate it with database, so the var myString must based on table. If data on table match, then show the textbox. If not, do not show.</p>

<p>The PHP like this :</p>

<pre><code>&lt;?php
include ("includes/_db_.php");
$query = mysql_query("SELECT * FROM t_test");
while ($data = mysql_fetch_array($query))
{
    $num = $data['status'];
}
?&gt;
</code></pre>

<p>I have tried that code but no effect.
Demo  without integrated with database : <a href="http://jsfiddle.net/Ltapp/369/" rel="nofollow">http://jsfiddle.net/Ltapp/369/</a></p>

<p>Any advice ?</p>
