Guest User

Untitled

a guest
Jun 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. <?php include("includes/header.php"); ?>
  2.  
  3.  
  4. <?php
  5.  
  6. if(isset($_POST['submit'])) {
  7.  
  8. $hair_colour = htmlspecialchars($_POST['hair_colour']);
  9. $eye_colour = htmlspecialchars($_POST['eye_colour']);
  10. $height = "'".$_POST['height_feet']." feet ".$_POST['height_inches']. " inches "."'";
  11. $build = htmlspecialchars($_POST['build']);
  12. $style = htmlspecialchars($_POST['style']);
  13. $maritial = htmlspecialchars($_POST['maritial']);
  14. $children = htmlspecialchars($_POST['children']);
  15. $language = htmlspecialchars($_POST['language']);
  16. $profession = htmlspecialchars($_POST['profession']);
  17. $interests = htmlspecialchars($_POST['interests']);
  18. $music = htmlspecialchars($_POST['music']);
  19. $film = htmlspecialchars($_POST['film']);
  20. $pets = htmlspecialchars($_POST['pets']);
  21. $smoke = htmlspecialchars($_POST['smoke']);
  22. $alcohol = htmlspecialchars($_POST['alcohol']);
  23.  
  24.  
  25. if(empty($hair_colour) || empty($eye_colour) || empty($build) || empty($style) || empty($maritial) || empty($children) || empty($language) || empty($profession) || empty($interests) || empty($music) || empty($film) || empty($pets) || empty($smoke) || empty($alcohol)) {
  26. echo('<p class="error">You did not fill in a required field.</p>'); }
  27.  
  28. elseif (!empty($_POST['submit'])) {
  29.  
  30. $query = ("UPDATE `users` SET hair_colour='$hair_colour', eye_colour='$eye_colour', height='$height', build='$build', style='$style', maritial='$maritial', children='$children', language='$language', profession='$profession', interests='$interests', music='$music', film='$film', pets='$pets', smoke='$smoke', alcohol='$alcohol' WHERE id = ".intval($_GET['users_id'])."; ");
  31.  
  32. mysql_query($query);
  33. header('Location: register3.php');
  34.  
  35. }
  36. }
  37. ?>
Add Comment
Please, Sign In to add comment