Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <?php
  2. $username="423423452";
  3. $password="6457458";
  4. $database="7456345343";
  5. mysql_connect(localhost,$username,$password);
  6. @mysql_select_db($database) or die( "Unable to select database");
  7.  
  8. $title = mysql_real_escape_string($_POST['title']);
  9. $description = mysql_real_escape_string($_POST['description']);
  10.  
  11.  
  12. if (!empty($title)) {
  13. $query = "INSERT INTO likes VALUES ('','$title','$description','')";
  14. mysql_query($query);
  15.  
  16. mysql_close();
  17. } else {echo "Error: Title cannot be blank";
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement