Advertisement
Guest User

POSTVariables

a guest
Jul 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1.     if ( isset( $_POST['firstname'] ) )
  2.         $firstname = strip_tags( trim( $_POST['firstname'] ) );
  3.    
  4.     if ( isset( $_POST['lastname'] ) )
  5.         $lastname = strip_tags( trim( $_POST['lastname'] ) );
  6.  
  7.     if ( isset( $_POST['phonenumber'] ) )
  8.         $lastname = strip_tags( trim( $_POST['phonenumber'] ) );
  9.  
  10.     if ( isset( $_POST['username'] ) )
  11.         $lastname = strip_tags( trim( $_POST['username'] ) );
  12.  
  13.     if ( isset( $_POST['userpassword'] ) )
  14.         $lastname = strip_tags( trim( $_POST['userpassword'] ) );
  15.        
  16.     if ( isset( $_POST['emailaddress'] ) )
  17.     {
  18.         if ( preg_match(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/, $_POST['$emailaddress'] ) )
  19.             $emailaddress = trim($_POST['emailaddress']);
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement