Show DevBest [PHP]Simple valid name system

Status
Not open for further replies.

StrongFaith

New Member
Jul 11, 2010
48
0
Well , i just coded something random , and i wanted to share this with you all.

Here is da PHP :
PHP:
<?php
$Go = $_POST['Go']; # Post submit button
$Name = $_POST['Name']; # Post name
If($Go) {
	$Error = "";
	If(!IsSet($Name) or Strlen($Name) < 3) {
		$Error .= "<font color='red'><p>Please post a name with more lengths than 3.</p></font>";
	}
	If(!$Error) {
		Echo "Your name has been replaced . If not then your name is valid.<br />Name replaced: ".Str_Replace(" ", "-", $Name);
	}
	Else {
		Echo $Error;
	}
}
?>
<hr />
<form method='post'>
Post a name and see if it's valid.<br />
<input type='text' name='Name' />&nbsp;<input type='submit' name='Go'>
</form>
<br /><br />
<fieldset>
<legend>Whats the point of this</legend>
<p>Well , if your name has not space , name won't be replaced , so that means it's valid but else (if it is with space) that means name is not valid and it will put "-" between (replacing space).</p>
</fieldset>

----------------------------------------------------------------------

Whats the point of this ?
Well , if your name has not space , name won't be replaced , so that means it's valid but else (if it is with space) that means name is not valid and it will put "-" between (replacing space).

This is very simple valid name system , so don't flame

Credits to me for coding this random script

Thank you!
 
Status
Not open for further replies.

Users who are viewing this thread

Top