Hi,
Try this:
function get_user_id($name) {
$string = join('',file('URL_TO_FILE')); //URL to the file where the userdata is stored
$a = explode("\n", $string);
$member = array();
while (list(, $value) = each ($a)) {
$b = explode("|!!|", $value);
$member[$b[0]] = $b[1];
}
if($member[$name] != "") {
return $member[$name];
} else {
return false;
}
}
if(get_user_id("user1") !== false) {
echo "The username exists!";
} else {
echo "The username doesn't exist!";
}
Hope it helps!
firemouse2001