Jump to content

Form Text Input Check String for Characters


aenigma

Recommended Posts

Well, although that was REALLY vague, lol, I managed to read enough to figure it out. Here's what I came up with:

	if (!ereg("^[a-zA-Z0-9_]{4,16}$", $_POST["uname"])) {
	echo "Invalid Username<br>Usernames must be between 4 and 16 characters, contain only alphanumeric characters and \"_\"";
	$allchecks = 0;
}

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.