Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5.         <title></title>
  6.     </head>
  7.     <body>
  8. <form action="index.php" method="post">
  9. Number of Bathrooms: <input type="text" name="bathrooms"><br>
  10. Number of bedrooms: <input type="text" name="bedrooms"><br>
  11. Location of House: <input type="text" name="location"><br>
  12. Size of House: <input type="text" name="size"><br>
  13. Cost of house: <input type="text" name="cost"><br>
  14. A short description of hte residence.: <input type="text" name="description"><br>
  15. location of picture of the server: <input type="text" name="picture"><br>
  16. <input type="Submit">
  17. </form>
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.         testest
  25.         <?php
  26.         $username = "asdasd";
  27.         $password = "asdasd";
  28.         $database = "asdasd";
  29.         $dbname = "asdasd";
  30.  
  31.         mysql_connect($database,$username,$password);
  32.  
  33.  
  34.         @mysql_select_db($dbname) or die( "Unable to select database");
  35.  
  36.         $bathrooms = $_POST['bathrooms'];
  37.         $bedrooms = $_POST['bedrooms'];
  38.         $location = $_POST['location'];
  39.         $size = $_POST['size'];
  40.         $cost = $_POST['cost'];
  41.         $description = $_POST['description'];
  42.         $picture = $_POST['picture'];
  43.  
  44.         $addpicture = "INSERT INTO pictureadd VALUES('','$bathrooms','$bedrooms','$location','$size','$cost','$description','$picture')";
  45.         mysql_query($addpicture);
  46.  
  47.         mysql_close();
  48.  
  49.  
  50.         ?>
  51.     </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement