Click here to Skip to main content
15,917,320 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i use javascript onblur function a textbox email field & then Checking mysql database in php page but error this page.


XML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function check(){
var e=(form.email.value);
alert(e);

//<?php
//   include('database_connection.php');
//  $check_email= mysql_query("SELECT userid FROM member WHERE email='e'");
//  if($check_email!==0)
//  {
//  echo ("Not Available");
//  }
//  else
//  {
//  echo ("Username is available");
//  }
//?>

}
</script>
</head>

<body>
<div style="position:absolute; overflow:hidden; left:498px; top:105px; width:150px; height:32px; z-index:2">Register Page</div>
<div style="position:absolute; overflow:hidden; left:342px; top:301px; width:150px; height:35px; z-index:8">Others E-Mail ID:</div>
<div style="position:absolute; overflow:hidden; left:408px; top:152px; width:150px; height:32px; z-index:2"> User ID :</div>
<div style="position:absolute; overflow:hidden; left:405px; top:191px; width:150px; height:29px; z-index:3">Password :</div>
<div style="position:absolute; overflow:hidden; left:366px; top:223px; width:173px; height:34px; z-index:4">Confirm Password :</div>
<div style="position:absolute; overflow:hidden; left:364px; top:265px; width:150px; height:36px; z-index:6">Contact Number :</div>

<form name="form" action=" " method="get" >
  <input name="email" id="email" type="text" style="position:absolute; width:200px; left:482px; top:152px; z-index:9" onBlur="check()">
  <input name="formtext2" type="password" style="position:absolute; width:200px; left:482px; top:190px; z-index:10" ">
  <input name="formtext3" type="password" style="position:absolute; width:200px; left:484px; top:225px; z-index:11"">
  <input name="formtext4" type="text" style="position:absolute; width:200px; left:485px; top:265px; z-index:13" ">
  <input name="formtext5" type="text" style="position:absolute; width:200px; left:486px; top:302px; z-index:14" ">
  <input name="formbutton1" type="submit" style="position:absolute; left:558px; top:365px; z-index:15; width: 100;" value="Register" >
  <input name="formbutton2" type="reset" style="position:absolute; left:422px; top:366px; z-index:16; width: 100;" value="Clear  ">
</form>

</body>
</html>
Posted
Updated 25-Apr-12 1:18am
v3
Comments
Sandeep Mewara 24-Apr-12 10:18am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

try calling a php file using ajax
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900