Use text input as php variable
- by Thomas Lai
<input type="text" onkeydown="domaincheck()" />
<?php
function domaincheck()
{
$recordexists = checkdnsrr("", "ANY");
if ($recordexists)
echo "The domain name has been taken. Sorry!";
else
echo "The domain name is available!";
}
?>
I want my php code to process the text input and say if it's a valid domain or not. The only thing that doesn't work is linking the input to the php.