Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>AirZooka ftw</title>
- </head>
- <body>
- <form action="test.php" method="post">
- Name: <input type="text" name="name" value="" /><br />
- <br />
- Address: <input type="text" name="address" value="" /><br />
- <br />
- Country: <input type="text" name="country" value="" /><br />
- <br />
- Zip Code: <input type="text" name="zip" value="" /><br />
- <br />
- Phone Number: <input type="text" name="phone" value="" /><br />
- <br />
- Email: <input type="text" name="email" value="" />
- <br />
- <input type="submit" />
- </form>
- </body>
- </html>
- <html>
- <head>
- <title>AirZooka ftw</title>
- </head>
- <body>
- <?php
- //defining username, password, and database variables so I can easily change them later.
- $username="root";
- $password="tacotruck";
- $database="form";
- $name=$_POST['name'];
- $address=$_POST['address'];
- $country=$_POST['country'];
- $zip=$_POST['zip'];
- $phone=$_POST['phone'];
- $email=$_POST['email'];
- mysql_connect(localhost,$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- $query = "INSERT INTO test_table VALUES ('$name','$address','$country','$zip','$phone','$email')";
- mysql_query($query);
- mysql_close();
- echo $email;
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement