Where is this error coming from? "unexpected T_STRING"

Discussion in 'PHP' started by jeeplaw, Feb 7, 2008.

  1. #1
    I'm parsing an installer file, and this damn error keeps popping up on line 14. Any ideas? Someone said to me it might be a PHP4 vs PHP5 issue?

    
    <?php
     @include( "includes/config.inc.php" );
     if( @$_POST['action'] == "Install" )
     {
      if( !file_exists( $_POST['basePath']."/includes/config.inc.php" ) )
      {
       echo "Base Path is incorrect<br />";
       die();	
      } 	
     	
      @mysql_connect( $_POST['mysqlHost'], $_POST['mysqlUser'], $_POST['mysqlPass'] ) or die( "Could not connect to SQL server!" );
      @mysql_select_db( $_POST['mysqlDB'] ) or die("Database Not Accessible!");
      
     DROP TABLE IF EXISTS `articles`;
    
    Code (markup):
     
    jeeplaw, Feb 7, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
     DROP TABLE IF EXISTS `articles`;
    
    Code (markup):
    This line throws an error. Regardless of the PHP version. It should be:
    
    mysql_query("DROP TABLE IF EXISTS `articles`") OR die(mysql_error());
    
    PHP:
     
    nico_swd, Feb 7, 2008 IP