Need help with PHP login code

Discussion in 'PHP' started by pnkgirl25, Aug 20, 2007.

  1. #1
    I have tried everything but I keep getting the following error messages:

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/f/o/c/focusevents/html/db_connect.php on line 8

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/f/o/c/focusevents/html/db_connect.php on line 9

    Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/f/o/c/focusevents/html/db_connect.php on line 11

    Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/content/f/o/c/focusevents/html/db_connect.php on line 12

    My code is as follows (Starting with line 1)
    [​IMG]
     
    pnkgirl25, Aug 20, 2007 IP
  2. sea otter

    sea otter Peon

    Messages:
    250
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What are you using for a program editor?

    Also, how did you get the code into your program editor? Meaning, did someone send you the code, did you type it in, did you cut and paste it from a .chm help file (this tends to cause problems like this).

    Lastly, what format did you save the file in?

    What I'm getting at is that it seems like you've got a file that's not in text format.

    You pasted an image of the code into your message, as opposed to pasting the code directly. Is there a reason for this?
     
    sea otter, Aug 20, 2007 IP
  3. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Why post the code as an image, just copy/paste the code into the post, you can do so inside
     and [/php ] tags to format it as well.
    
    Assuming you are using WordPad or something similar, you need to make sure you select "Text Document" in the "Save as type" dropdown when you save the file. This is found under the filename textbox.
    PHP:
     
    krt, Aug 21, 2007 IP