No Description

insert_user.php 604B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. include "config.php";
  3. // $email = mysqli_real_escape_string($connect, $POST['email']);
  4. // $password = mysqli_real_escape_string($connect, $POST['password']);
  5. $email = $_POST['email'];
  6. $password = $_POST['password'];
  7. $query = "INSERT INTO Users (email, password) VALUES ('$email', '$password')";
  8. // var_dump($query);
  9. // echo "Despues\n";
  10. $results = mysqli_query($connect, $query);
  11. // var_dump($results);
  12. echo $results;
  13. if($results == True)
  14. {
  15. echo "user registered";
  16. }
  17. else {
  18. echo "user not registered";
  19. }
  20. ?>