Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('pengaturan.php');
- // If the values are posted, insert them into the database.
- if (isset($_POST['username']) && isset($_POST['password'])){
- $username = $_POST['username'];
- $email = $_POST['email'];
- $password = $_POST['password'];
- $active = $_POST['active'];
- $date = $_POST['date'];
- $regby= $_POST['regby'];
- $subject = 'Account Information';
- $message = 'You have been registered by ".$regby." in ilyasahost.com And you can log in to our web now \n
- YOUR ACCOUNT DETAILS :
- Your email is : ".$email."
- Your password is : ".$password."
- Duration account : ".$active."
- Date Register : ".$date."
- Register by : ".$regby.';
- $headers = 'From: IlyasaHost <admin@ilyasahost.com>' . "\r\n" .
- 'X-Mailer: PHP/' . phpversion();
- mail($email, $subject, $message, $headers);
- $query = "INSERT INTO `users` (username, password, email, active, date, regby) VALUES ('$username', '$password', '$email', '$active' , '$date' , '$regby')";
- $result = mysql_query($query);
- if($result){
- ?>
- <script>alert('successfully registered ');</script>
- <?php
- }
- else
- {
- ?>
- <script>alert('error while registering you...');</script>
- <?php
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement