Jump to content

Validate User Availability HELP!


matvespa

Recommended Posts

Hi guys. Im having problem validating user availability on php and ajax. Below is my code:

if($validateValue !="[email protected]"){		// validate??
$arrayToJs[2] = "true";			// RETURN TRUE
echo '{"jsonValidateReturn":'.json_encode($arrayToJs).'}';			// RETURN ARRAY WITH success
}

This code works fine. But i want to change it to validate the value of the user email in my db instead of array in the code. I manage to display out my user email in that page. Below is the code for that:

$result = mysql_query("SELECT * FROM user_registered");

while($row = mysql_fetch_array($result))
  {
  echo $row['Email'];
  }

But when i combine the code tgt, it seem not to be working...the code for the combination is below:

$result = mysql_query("SELECT * FROM user_registered");

while($row = mysql_fetch_array($result))
  {
  echo [b]$row['Email'][/b];
  }

if($validateValue != [b]$row['Email'][/b]){		// validate??
$arrayToJs[2] = "true";			// RETURN TRUE
echo '{"jsonValidateReturn":'.json_encode($arrayToJs).'}';			// RETURN ARRAY WITH success
}

Link to comment
https://forums.phpfreaks.com/topic/206600-validate-user-availability-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.