<html>
<head>
<script langauge="javascript">
function get_value()
{
document.frm.c_name.value =
opener.document.registrationform.userid.value;
}
function test_value()
{
}
function post_value(){
opener.document.registrationform.userid.value =
document.frm.c_name.value;
self.close();
}
</script>
<title>Check Availability</title>
</head>
<body onLoad="get_value()"
bgcolor="#ffffff" text="#000000"
link="#0000ff" vlink="#800080"
alink="#ff0000">
<form name="frm" method=post action='<? echo
PHP_SELF ;?>'>
<table border=0 cellpadding=0 cellspacing=0 width=250>
<tr><td align="center"><table
width="282" height="95"
border="0">
<tr>
<th width="83"
scope="col">Your name
<input type="text"
name="c_name" size=12></th>
<th width="47"
scope="col"><input name="button"
type=button
onClick="test_value();"
value='Test'></th>
<th width="109"
scope="col"><input name="button2"
type=button
onClick="post_value();"
value='Close'></th>
</tr>
<tr>
<th colspan="3" scope="row">
<?php
$logname = _name'];
echo $logname;
mysql_pconnect("mysql.websitesource.net","tek
nowe_test1","teknowedge");
mysql_select_db("teknowe_real_estate") or
die("Unable to select
database");
$query = "SELECT count(*) FROM user_registration where
userid='$logname' ";
$result = mysql_query($query);
if(!$result)
{
echo 'Cannot run query.';
exit;
}
$count = mysql_result( $result, 0, 0 );
if ( $count > 0 )
{
echo "user id already exits";
}
else
{
echo "User Id is available" ;
}
?></th>
</tr>
</table>
</td>
</tr>
</table></form>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the
Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP googlegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---
|