pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

PHP PasteBin - Home - Help - Archive

Posted by fusionexport on December Sat 8th 9:24 PM - Never Expires (modification of post by fusionexport view diff)
diff | download | new post

  1. <?php
  2.  
  3. /*
  4. news_subject - news_datestamp
  5. news_extended
  6. */
  7.  
  8. mysql_connect("mysql.jorgepena.be", "user", "pass") or die(mysql_error());
  9. mysql_select_db("instagib") or die(mysql_error());
  10.  
  11. $result = mysql_query("SELECT * FROM fusion_news ORDER BY news_id") or die(mysql_error());
  12.  
  13. while ($row = mysql_fetch_array($result)) {
  14.    echo "\n-----------------------------------------------\n\n";
  15.    echo $row['news_subject'] . " - " . date("Y-m-d H:i:s", $row['news_datestamp']) . "\n";
  16.    echo (($row['news_extended'] != NULL) ? stripslashes($row['news_extended']) : stripslashes($row['news_news']));
  17. }
  18.  
  19. ?>

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
Syntax Highlighting:
To highlight particular lines, prefix each line with @@
Pressing TAB inserts 3 spaces