Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.45 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <HTML>
  3.  
  4. <head>
  5.     <title> home session </title>
  6. </head>
  7. <body>
  8. <form action = "includes/signup.inc.php" method = "POST">
  9.  
  10.     <input name = "first" type ="text" placeholder = "firstname" >
  11.     <br>
  12.     <input name = "last" type ="text" placeholder = "lastname" >
  13.     <br>
  14.     <input name = "email" type ="email" placeholder = "email" >
  15.     <br>
  16.     <input name = "uid" type ="text" placeholder = "uid" >
  17.     <br>
  18.     <input name = "pwd" type ="password" placeholder = "password" >
  19.     <br>
  20.     <button type ="submit" name ="button" >sign in</button>
  21. </form>
  22.     <?php
  23.     /*$sql = "select * from users ;" ;
  24.     // mysqli_query  :you send the cmd request and returne ressources if success else returns false
  25.     $result = mysqli_query ( $conn, $sql ) ;
  26.     //mysql_num_rows ( resource $result ) : int // Récupère le nombre de lignes d'un jeu de résultat
  27.     $resultCheck = mysqli_num_rows ( $result );
  28.     if($resultCheck > 0){
  29.         while ($row = mysqli_fetch_assoc($result)){
  30.             echo $row['pwd']."<br>";
  31.         }
  32.     }*/
  33.     ?>
  34.     <?php
  35.     $fullURL = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" ;
  36.     if (strpos($fullURL,"signup=empty")==true){
  37.         echo "<h1> you should fill all cases !</h1>" ;
  38.         exit() ;
  39.     }else{
  40.         if (strpos($fullURL,"signup=success")==true){
  41.         echo "you are signed up successfully !" ;
  42.         exit() ;
  43.         }
  44.     }
  45.     ?>
  46. </body>
  47.  
  48. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement