View Single Post
  #9 (permalink)  
Old 02-23-2008, 08:11 PM
phpforfun's Avatar   
phpforfun phpforfun is offline
Programming God
 
Join Date: Feb 2008
Posts: 787
Last Blog:
Programming "Just a ...
Credits: 102
Rep Power: 9
phpforfun will become famous soon enoughphpforfun will become famous soon enough
Default

Quote:
Originally Posted by John View Post
The back tick explicitly says "whats between me is a column name."


Have you removed the @ symbol yet?...
Yes sir.

PHP Code:
<?PHP
    $host        
=    'localhost';
    
$user        =    'root';
    
$pass        =    'private1';
    
$database    =    'roscripts';
    
$connect = @mysql_connect $host$user$pass ) ;

    
$sql "SELECT * FROM `articles` WHERE `ID` = '" mysql_real_escape_string $_GET['ID'] ) . "'";    

    
mysql_select_db $database$connect );
    if ( @
mysql_query $sql ) )
    {
        
$query mysql_query $sql );
        
$row mysql_fetch_assoc $query );

        echo 
$row['ID'] . '<br />' $row['article_title'] . '<br />' $row['article_content'];
    }
    else {
        die ( 
mysql_error () );
    }
?>
Thats the code now, which will output nothing.
Reply With Quote