Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. $dbhost = "localhost";
  4.  
  5. $dbname = "musexchange";
  6.  
  7. $dbuser = "root";
  8.  
  9. $dbpass = "";
  10.  
  11.  
  12.  
  13.  
  14. mysql_connect ($dbhost, $dbuser, $dbpass) or die("Could not connect: ".mysql_error());
  15.  
  16. mysql_select_db ($dbname) or die(mysql_error());
  17.  
  18.  
  19.  
  20.  
  21. $firstname=htmlentities($_REQUEST['firstname']);
  22. $lastname=htmlentities($_REQUEST['lastname']);
  23. $comments=htmlentities($_REQUEST['comments']);
  24. mysql_query("INSERT INTO feedback (firstname,lastname,comments) VALUES('$firstname','$lastname',$comments);");
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement