If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Tag Issues

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-24-11, 15:50
Alcatraz Alcatraz is offline
Registered User
 
Join Date: Oct 2011
Posts: 5
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
File Type: txt function_do.txt (13.1 KB, 2 views)
Reply With Quote
  #2 (permalink)  
Old 10-24-11, 16:08
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
Mind tossing that up in a pastebin somewhere (for example: http://pastebin.mozilla.org/)? 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? ***
Reply With Quote
  #3 (permalink)  
Old 10-24-11, 16:30
Alcatraz Alcatraz is offline
Registered User
 
Join Date: Oct 2011
Posts: 5
Here it is again. Thanks for the info on how to use PasteBin.
Attached Files
File Type: txt function_do.txt (13.1 KB, 1 views)
Reply With Quote
  #4 (permalink)  
Old 10-24-11, 17:19
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
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
Code:
UserID = "$. _SESSION['UserID']
which should read
Code:
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On