Results 1 to 4 of 4

Thread: Tag Issues

  1. #1
    Join Date
    Oct 2011

    Unanswered: Tag Issues

    Hi again,

    First, thanks goes out to Jaded for pointing me in the right direction. Now I have come to another impasse.

    I keep getting the following error in my function_do.php code

    Parse error: syntax error, unexpected '$' in C:\xampp\htdocs\Lab_12\function_Do.php on line 205.

    I checked and re-checked all lines within that function from line 205 on up, tried some different things and still get the same error message.

    I don't know what I'm missing to keep getting this error. I keep adding/deleting items that I think are throwing this error out there to no avail.

    If I could get some help and an explanation of the error message that would be fantastic.
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Mind tossing that up in a pastebin somewhere (for example: I'm not very keen on downloading stuff like that...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Oct 2011
    Here it is again. Thanks for the info on how to use PasteBin.
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    get yourself an editor that is PHP aware, that will help identfying tags, code blocks
    there's lots of them out there ranging from the PHP 'envrionments/IDEs' like Eclipse, Netbeans to Editors such as HTML kit

    looking at line 205
    PHP Code:
    $sql "SELECT * FROM Friends WHERE UserID = "$. _SESSION['UserID']." AND
            FriendID = 
    $row->UserID AND accepted = 0 AND invited = 1"
    the problem is the
    UserID = "$. _SESSION['UserID']
    which should read
    UserID = ".$_SESSION['UserID']
    however assuming that userid is a string / text / char column then the literal value should be quoted
    PHP Code:
    $sql "SELECT * FROM Friends WHERE UserID = '".$ _SESSION['UserID']."' AND....... 
    you may also need to refer to the row array item outside quotes
    PHP Code:
    $sql "SELECT * FROM Friends WHERE UserID = '".$_SESSION['UserID']."' AND
            FriendID = '"
    .$row->UserID."' AND accepted = 0 AND invited = 1"
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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