Advertisement
Guest User

Untitled

a guest
Jan 20th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <?php
  2. require('pengaturan.php');
  3. // If the values are posted, insert them into the database.
  4. if (isset($_POST['username']) && isset($_POST['password'])){
  5. $username = $_POST['username'];
  6. $email = $_POST['email'];
  7. $password = $_POST['password'];
  8. $active = $_POST['active'];
  9. $date = $_POST['date'];
  10. $regby= $_POST['regby'];
  11.  
  12. $subject = 'Account Information';
  13. $message = 'You have been registered by ".$regby." in ilyasahost.com And you can log in to our web now \n
  14. YOUR ACCOUNT DETAILS :
  15. Your email is : ".$email."
  16. Your password is : ".$password."
  17. Duration account : ".$active."
  18. Date Register : ".$date."
  19. Register by : ".$regby.';
  20. $headers = 'From: IlyasaHost <admin@ilyasahost.com>' . "\r\n" .
  21. 'X-Mailer: PHP/' . phpversion();
  22. mail($email, $subject, $message, $headers);
  23.  
  24. $query = "INSERT INTO `users` (username, password, email, active, date, regby) VALUES ('$username', '$password', '$email', '$active' , '$date' , '$regby')";
  25. $result = mysql_query($query);
  26. if($result){
  27. ?>
  28. <script>alert('successfully registered ');</script>
  29. <?php
  30. }
  31. else
  32. {
  33. ?>
  34. <script>alert('error while registering you...');</script>
  35. <?php
  36. }
  37. }
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement