Location: PHPKode > scripts > Create Your Own Directory > cms/HRAS/users/ajax1.php
<?php
require_once "../../auth/config.php";
$link = mysql_connect($hostname, $username,$password);
$res=mysql_select_db($dbname,$link);
$ref=$_SERVER[HTTP_REFERER];
$rip = $_SERVER['REMOTE_ADDR'];
$domain = strstr($ref, 'realestate');
if(($domain)){
$name1 = $_GET['name'];
$email=$_GET['email'];
$id1 = $_GET['id'];
$value1 = $_GET['value'];
$fnam=$_GET['fname'];
$fieldid=$_GET['fid'];
$len=strlen($value1);
$str1="select * from user where email='$email' ";
$result1 = mysql_query($str1);
$id=0;
if($line = mysql_fetch_array($result1, MYSQL_ASSOC))
	{		

		$id1 = $line['id'];}

		if($id!=0){
			echo "Entered values for $fnam field is already present in the database";
		}else{
			if($value1 !="" && $value1 != "undefined"){
				$str = "update user set $fnam='$value' where UserId=$id1 ";
				$result = mysql_query($str);
				echo "Entered values for $fnam field will be updated after admin review ";				
				}else{
					  echo "Entered values for $fnam field is empty so the value will not be updated in table";
					}
		}
}
?>
Return current item: Create Your Own Directory