Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Mysql

  1. #1
    Join Date
    Jun 2007
    Location
    Kent
    Posts
    4,101
    Tokens
    981

    Latest Awards:

    Default Mysql

    PHP Code:
    Parse error:  syntax errorunexpected ';' in /home/sitename/public_html/panel/connect.php on line 10 
    I get that error on Radio DJ Panel

    I typed in the mysql details

    How to fix it?

    Im rubbish at mysql...

    +Rep

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Has nothing to do with MySQL, it's a php error, post connect.php code.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Jun 2007
    Location
    Kent
    Posts
    4,101
    Tokens
    981

    Latest Awards:

    Default

    PHP Code:
    <?

    //set local variables
    $dbhost ="localhost"//Database Host
    $dbuser ="sitename_????"//Database User
    $dbpass ="sitename_????"//Database Password
    $dbname ="sitename_????"//Database Name

    //connect 
    $db =mysql_pconnect($dbhost,$dbuser,$dbpass
    mysql_select_db($dbname,$db;

    ?>

  4. #4
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    61,184
    Habbo
    Habbic

    Latest Awards:

    Default

    you never closed the bracket on mysql select db...

    also should be a space after the = on line before

  5. #5
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    Try This Edit what is blue to you DB details

    <?

    //set local variables
    $dbhost ="localhost"; //Database Host
    $dbuser ="Username"; //Database User
    $dbpass ="Password"; //Database Password
    $dbname ="Database Name"; //Database Name

    //connect


    $db =mysql_pconnect($dbhost,$dbuser,$dbpass;
    mysql_select_db($dbname,$db )

    ?>

  6. #6
    Join Date
    Jun 2007
    Location
    Kent
    Posts
    4,101
    Tokens
    981

    Latest Awards:

    Default

    Quote Originally Posted by entrance View Post
    you never closed the bracket on mysql select db...

    also should be a space after the = on line before
    Quote Originally Posted by 2fast2kwl View Post
    Try This Edit what is blue to you DB details

    <?

    //set local variables
    $dbhost ="localhost"; //Database Host
    $dbuser ="Username"; //Database User
    $dbpass ="Password"; //Database Password
    $dbname ="Database Name"; //Database Name

    //connect


    $db =mysql_pconnect($dbhost,$dbuser,$dbpass;
    mysql_select_db($dbname,$db )

    ?>
    Did that, still the same error!

  7. #7
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    61,184
    Habbo
    Habbic

    Latest Awards:

    Default

    End of the both lines after //connect

    you need the close the bracket

    so it'd be


    $db = mysql_connect($dbhost,$dbuser,$dbpass);
    mysql_select_db($dbname,$db) ;

  8. #8
    Join Date
    Jun 2007
    Location
    Kent
    Posts
    4,101
    Tokens
    981

    Latest Awards:

    Default

    Quote Originally Posted by entrance View Post
    End of the both lines after //connect

    you need the close the bracket

    so it'd be


    $db = mysql_connect($dbhost,$dbuser,$dbpass);
    mysql_select_db($dbname,$db) ;

    Oh thanks, im dumb at mySQL.

    Thanks!

  9. #9
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Change code to:

    PHP Code:
    <?

    //set local variables
    $dbhost ="localhost"//Database Host
    $dbuser ="sitename_????"//Database User
    $dbpass ="sitename_????"//Database Password
    $dbname ="sitename_????"//Database Name

    //connect 
    $db =mysql_pconnect($dbhost,$dbuser,$dbpass); 
    mysql_select_db($dbname,$db);

    ?>
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  10. #10
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by RyanDOT View Post
    Oh thanks, im dumb at mySQL.

    Thanks!
    Its PHP not mySQL. Your connecting too a mySQL database through PHP code, it was the PHP that had the error.


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •