No Description

update_profile.php 660B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. include "config.php";
  3. $firstN = $_POST['first_name'];
  4. $lastN = $_POST['last_name'];
  5. $country = $_POST['country'];
  6. $city = $_POST['city'];
  7. $phone = $_POST['phone'];
  8. $healthcare = $_POST['healthcare'];
  9. // have tp change from insert to update or add update
  10. $query = "INSERT INTO Profile (first_name, last_name, country, city, phone_number, healthcare_provider)
  11. VALUES ('$firstN', '$lastN', '$country', '$city', $phone, '$healthcare')";
  12. $results = mysqli_query($connect, $query);
  13. echo $results;
  14. if($results == True)
  15. {
  16. }
  17. else {
  18. echo "User not registered";
  19. }
  20. ?>