Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $name = $_POST['name'];
- $lname = $_POST['lname'];
- $uname = $_POST['uname'];
- $pass = $_POST['pass'];
- $pass1 = $_POST['pass1'];
- $email = $_POST['email'];
- $email1 = $_POST['email1'];
- $to = "$email";
- $subject = " dickhead ur mum";
- $txt = "ur dads an ass";
- $headers = "From: webmaster@phirani.com" ."\r\n";
- mail($to,$subject,$txt,$headers);
- if (empty($name) || empty($lname) || empty($uname) ||
- empty($pass) || empty($pass1) || empty($email) || empty($email1)){
- die("<br> Please fill out the form correctly<br />");
- }
- echo("Thank you $name your registration form has been accepted and a confirmation email will be sent to $email");
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "dbusers";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO dropbox (name, lname, uname, pass, pass1, email, email1)
- VALUES ('$name', '$lname','$uname','$pass','$pass1' ,'$email','$email1')";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- ?>
- <html>
- <body>
- <a href="form.html">Login</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement