I can not get my site to connect to its database properly, I have narrowed it down to two files (attached) and I do not know what is wrong with them. I think it is the files, I have looked over the db a few times and it seems fine. I have also provided a copy of the SQL if someone want to look it over. Can someone please help me? You can see the error yourself HERE.

Recommended Answers

All 2 Replies

nvalid query -- SELECT * FROM `cu_users` WHERE `userid` = -- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

it seems that you don't have the right syntax

"SELECT * FROM `cu_users` WHERE `userid` = $u"

should be

"SELECT * FROM cu_users WHERE userid = $u"

Thanks, this fixed the first problem. Unfortunately it looks like I have some more, it now says,

Parse error: syntax error, unexpected T_LIST in /home/maddscom/ourhangoutspace.com/gw/includes/userinc.php on line 14

Anyone want to look through the files I provided to see if they can find the errors? I would really appreciate it!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.