Advertisement
Guest User

Olivia-task2-28.11

a guest
Nov 28th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. $link=mysql_connect ('localhost', 'root', '');
  4. mysql_select_db ('books_collection');
  5.  
  6. $id = $_POST['id'];
  7. $title = $_POST['title'];
  8. $author= $_POST['author'];
  9. $genre= $_POST['genre'];
  10.  
  11. $result = mysql_query("INSERT INTO book (id, title, author, genre) VALUES('$id', '$title', '$author', '$genre')");
  12.  
  13. var_dump($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement