I want to make it so that new input boxes only appear if information in the previous box is correct, by checking it with a mysql_query can I adapt this code
function show(id){
if(document.getElementById(id+"-link").style.display=="none") {
document.getElementById(id+"-link").style.display="block";
document.getElementById(id+"-input").style.display="block";
}
}
<tr>
<td><input type="text" id="a1" name="em_1"></td>
<td><a href="#null" onclick="show('b1')">and</a></td>
</tr><tr>
<td><input type="text" id="b1-input" name="em_2" style="display:none"></td>
<td><a href="#null" style="display:none" id="b1-link"</a></td>
</tr><tr>
so somewhere in here I need to add :
$userCheck=mysql_query(SELECT email FROM users WHERE name = "em_1")
$row=mysql_num_rows($usercheck)
if($row!==0){"show('b1')";}
or something to that affect, without refreshing the page. Is this possible?
mysql_queryin new applications.mysql_*functions are deprecated, use PDO or MySQLi now.