i m new user here.. if i did any mistakes. i m sorry for that..
Dear i m making a user Registration form... in which i have added a button CHECK AVAILIBILTY
this button work is to chck in DATABASE that the user Input email address or ID is availble are not..???
i m also using php language within the javascript... but i m not getting, how to assign php variable variable value to javascript variable??? plz help me
i know the mysql query..
<?php
$query=mysql_num_rows(mysql_query("SELECT user_email FROM user_area WHERE user_email='email'"))
/*1st email will be taken from input txt field and then match with database. if $query is equal to 1 then its mean email/ID not available, if $query is equal to zero its mean not avalibl.
*/
?>
<script language='javascript'>
function EMAIL_AVALIBLE()
{
var email_chk="document.getElementById('email').value";
// plz tell me what i do here
}
<form action="register_act.php" method="POST" name="register">
E-Mail Address :
<input type='text' name='email' id="email" >
<input type='button' name='Check' onClick='EMAIL_AVALIBLE()' value='Check E-Mail Avalibility' >
</form>
Edited by Jaan, 04 April 2010 - 09:57 AM.
Please use code tags when you are posting your codes!


Sign In
Create Account

Back to top









