Use text input as php variable
Posted
by
Thomas Lai
on Stack Overflow
See other posts from Stack Overflow
or by Thomas Lai
Published on 2012-11-22T04:01:34Z
Indexed on
2012/11/22
5:01 UTC
Read the original article
Hit count: 240
<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.
© Stack Overflow or respective owner