Thread: parse error

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    12
    Rep Power
    0
    Is it possible to access MySQL server (shareware version 3.22.32 runs under Windows 95 with Winsock 2) from other server via php3 ?

    I try to access to MySQL database "test" via PHP script that runs on other server and all the time I get the message: Parse error: parse error in /www/myserver/test.php3 on line 2

    Here is above mentioned PHP script:
    <?php
    mysql_connect(IP address of PC with MySQL under Windows95,username,password);
    @mysql_select_db(test) or die( "Unable to select database");
    ?>

    I have no problem to access database "test" via telnet from other server. PHP script runs on other server perfectly if I try to access local MySQL database on it:
    <?php
    mysql_connect(localhost,username,password);
    @mysql_select_db(database name) or die( "Unable to select database");
    ?>

    Could somebody help?
    Thank you for your assistance.

    Roman Kostinski
    e-mail: roman@astelit.ru
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    27
    Rep Power
    0
    if you get a parse error, this means your php code is wrong.
    i suggest you leave the @ before mysql_connect

    somewhat like:
    $my_conn=mysql_connect(yourhost,name,pass);

    on the end of the script you use
    mysql_close($my_conn);

Similar Threads

  1. I continually receive parse error, unexpected T_Variable
    By fmwebschool in forum PHP Development
    Replies: 15
    Last Post: September 17th, 2004, 08:18 PM
  2. smarty renders blank page
    By eemo in forum PHP Development
    Replies: 3
    Last Post: January 19th, 2004, 05:54 AM
  3. newbie question re: parse error
    By heliosweb in forum PHP Development
    Replies: 36
    Last Post: October 9th, 2003, 09:26 AM
  4. array has parse error in it...how to resolve?
    By houseman in forum PHP Development
    Replies: 4
    Last Post: August 1st, 2003, 03:26 PM
  5. Passing a variable between pages - getting a parse error.
    By Anvil222 in forum PHP Development
    Replies: 7
    Last Post: July 9th, 2002, 03:59 PM

IMN logo majestic logo threadwatch logo seochat tools logo