Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2. $username="root";
  3. $password="password";
  4. $database="memocloud";
  5.  
  6. mysql_connect(localhost,$username,$password);
  7. mysql_close();
  8. ?>
  9. <?
  10. $username="root";
  11. $password="password";
  12. $database="memocloud";
  13.  
  14. $noteid=$_POST['noteid'];
  15. $userid=$_POST['userid'];
  16. $title=$_POST['title'];
  17. $color=$_POST['color'];
  18. $row=$_POST['row'];
  19. $content=$_POST['content'];
  20.  
  21. mysql_connect(localhost,$username,$password);
  22. @mysql_select_db($database) or die( "Unable to select database");
  23.  
  24. $query = "INSERT INTO contacts VALUES ('','$noteid','$userid','$title','$color','$row','$content')";
  25. mysql_query($query);
  26.  
  27. mysql_close();
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement