Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysql_connect( "localhost","root","root" );
- if ( !$con ){
- die( 'Could not connect: ' . mysql_error() );
- } else {
- mysql_select_db( "lolerstream", $con );
- $query = "SELECT * FROM suggestions";
- $result = mysql_query( $query,$con ) or die( 'Could not execute query: ' . mysql_error() );
- if ( mysql_num_rows( $result ) ) {
- while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
- printf(" <div class='suggestion'> %s - %s </div> \n ", $row["submitdate"], $row["content"]);
- }
- }
- }
- mysql_close($con)
- ?>
Advertisement
Add Comment
Please, Sign In to add comment