Results 1 to 6 of 6

Thread: Simple PHP Error

  1. #1
    Trench Warfare
    Join Date
    May 2003
    Location
    Australia
    Posts
    813

    Exclamation Simple PHP Error

    On one of the sites I am currently building I am getting this error:

    Parse error: parse error, unexpected T_VARIABLE in /home/toolrevi/public_html/db_config.php on line 5

    I have a feeling it is easy to fix, but since I am not a programmer, I don't know how to fix it. It is a script I got from someone and I haven't been able to get a reply from them regarding this problem, hence I an trying this forum.

    Any help is appreciated...

    Cheers

  2. #2
    Registered Xander's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    263
    Ah the lovely T_VARIABLE error message. Unfortunately I don't know offhand what could be causing it. Could you post the lines of code from line 1 to line 6 or 7 (obvisouly removing any sensitive/password stuff if there is). Its probably a missing quote, or escape character.

  3. #3
    Web Monkey MarkB's Avatar
    Join Date
    Nov 2003
    Location
    London, UK
    Posts
    1,783
    Have you closed all {}, checked that all ' and " have a match, etc? And that you've closed statements with ;
    Stepping On Wires - the new blog

  4. #4
    Trench Warfare
    Join Date
    May 2003
    Location
    Australia
    Posts
    813
    Fixed it. Turns out it was missing a ;

    Cheers...
    Last edited by ozgression; 01-15-2005 at 05:54 PM.

  5. #5
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Ya... I usually get that when missing a ;
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  6. #6
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    everytime i get a t variable error the first thing i do is fix the missing ;

    :P

Similar Threads

  1. Review: Professional PHP Programming
    By Chris in forum Books
    Replies: 6
    Last Post: 07-17-2013, 05:26 AM
  2. Replies: 0
    Last Post: 11-25-2004, 01:06 AM
  3. Replies: 8
    Last Post: 11-12-2004, 04:10 PM
  4. Replies: 0
    Last Post: 10-29-2004, 09:43 PM
  5. PHP, ODBC, and Unicode compatibilities...
    By Stevens in forum Website Programming & Databases
    Replies: 4
    Last Post: 10-14-2003, 09:27 AM

Bookmarks

Posting Permissions

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