Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Mysql INsert appened var
  2. preg_match_all("/<s*p[^>]*>([^<]*)<s*/s*ps*>/", $new_post, $matches);
  3.  
  4. $article = ' ';
  5.  
  6. foreach ($matches[0] as $media){
  7. $article .= $media;
  8.  
  9. }
  10.  
  11. $query = "INSERT INTO blog_post (date,article,link) VALUES('$date','$article','$guid_clean')";
  12. mysqli_query($dbc,$query);
  13.        
  14. $article = mysql_real_escape_string($article);
  15. // And if necessary if these came from user input...
  16. $guid_clean = mysql_real_escape_string($guid_clean);
  17. $date = mysql_real_escape_string($date);
  18.  
  19. $query = "INSERT INTO blog_post (date,article,link) VALUES('$date','$article','$guid_clean')";
  20. mysqli_query($dbc,$query);