Advertisement
Guest User

Untitled

a guest
May 29th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?
  2. $username="username";
  3. $password="password";
  4. $database="your_database";
  5.  
  6. $url=$_POST['url'];
  7.  
  8. mysql_connect(localhost,$username,$password);
  9. @mysql_select_db($database) or die( "Unable to select database");
  10.  
  11. $query = "INSERT INTO tableName(url) VALUES ($url)";
  12. mysql_query($query);
  13.  
  14. mysql_close();
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement