Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this is in a file called functions, right now it is the only thing in there besides my mysql connection.
- function protect($string){
- $string = trim(strip_tags(addslashes($string)));
- return $string;
- }
- i include it here on my other page.
- <?
- session_start();
- if(($_POST['check']) == $_SESSION['check']) {
- echo $_SESSION['check'];
- }else{
- echo 'Your CAPTCHA numbers are incorrect.';
- }
- include('functions.php');
- ?>
- and this is where im using it on the same page.
- if(isset($_POST['submit'])){
- //protect and then add the posted data to variables
- $username = protect($_POST['username']);
- $password = protect($_POST['password']);
- $password2 = protect($_POST['password2']);
- $email = protect($_POST['email']);
- $permisson = protect ($_POST['permission']);
- $agree = protect ($_POST['agree']);
- im getting this error:
- Fatal error: Call to undefined function protect() in C:\inetpub\wwwroot\register.php on line 69
- which is this line:
- $username = protect($_POST['username']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement