Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function CheckInputs_Create_Change($username, $password, $passwordagain)
- {
- if($username == "" || $password == "" || $passwordagain == "")
- {
- return false
- }
- else
- {
- if($password==$passwordagain)
- {
- if(strpos($username," ") !== false || strpos($password, " ") !== false || strpos($passwordagain, " ") !== false)
- {
- return false
- }
- else
- {
- if(preg_match("^b[a-zA-Z0-9_]+b$", $username) != 1 || preg_match("^b[a-zA-Z0-9_]+b$", $password) != 1 || preg_match("^b[a-zA-Z0-9_]+b$", $passwordagain) != 1)
- {
- return false;
- }
- else
- {
- if(mb_detect_encoding($username, 'UTF-8')!== 'UTF-8' || mb_detect_encoding($password, 'UTF-8')!== 'UTF-8' || mb_detect_encoding($passwordagain, 'UTF-8') !=='UTF-8')
- {
- return false
- }
- else
- {
- return true
- }
- }
- }
- }
- else
- {
- return false
- }
- }
- }
- ?>
- $output=CheckInputs_Create_Change($username, $password, $passwordagain);
- if($output==true)
- include 'CheckInputs_Create_Change.php';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement