Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1.  
  2. <?
  3. $hostname = "localhost";
  4. $username = "root";
  5. $password = "amatory";
  6. $dbName = "uform";
  7.  
  8. mysql_connect($hostname,$username,$password) OR DIE("FAIL CONNECTION"); // if fail
  9. mysql_select_db($dbName) or die(mysql_error());  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. $select_post_query = "(Select ibf_topics.tid  From ibf_topics, ibf_posts where ibf_posts.topic_id=ibf_topics.tid Limit 1) ";
  19.  
  20. $Post_Query   = "INSERT INTO ibf_posts SET author_id = '2007', ip_address='localhost', author_name ='System',  post = 'post_text', topic_id=    $select_post_query   WHERE ibf_posts.topic_id = $select_post_query";
  21. mysql_query($Post_Query ) or die(mysql_error());
  22.  
  23. echo $title ;
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement