Email Validation Function


 function Exist($value, $field_name, $table_name, $other_condition='')
{

	if ($other_condition != "") $sql_other_condition = " AND ".$other_condition." ";

	else  $sql_other_condition = "";

	$sql = "SELECT COUNT(*) FROM ".$table_name." WHERE ".$field_name."='".$value."' ".$sql_other_condition;

	$rs  = mysql_query($sql);

	$rec = mysql_fetch_array($rs);

	if ($rec[0] > 0) return true;

	else return false;

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s