acctman Posted April 17, 2011 Share Posted April 17, 2011 Hi I need help adding $inputUri to the function checkURL($string) Hi can someone help me with this. I have a inputbox that displays a default text "Input ID Here...". I need to take $inputUri and check it against function checkUrl($string) to see if its still there. If the text hasn't been cleared then display the addError message public function checkUrl($string) { $inputUri = 'Input ID Here...'; if(empty($string) || preg_match("#^([A-Z0-9][A-Z0-9_ -]*(?:.[A-Z0-9][A-Z0-9_ -]*)+):?(d+)?/?#i", $string))) { return true; } else { if( isset($this) ) { $this->addError("Error: Input Your ID"); } return false; } } Quote Link to comment https://forums.phpfreaks.com/topic/233998-modifying-a-function-if-statement/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.