Thread: Error
View Single Post
  #6 (permalink)  
Old 10-07-06, 08:38 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Firstly, I wish you would edit this post and use the PHP code wrappers.

Secondly, I don't see any include/require files, so I am assuming that you are not using any constants. Therefore, there are a lot of other errors, some of which might be causing the error in question.

I recommend putting the following line in after your opening <?php tag -
PHP Code:

error_reporting(E_ALL); 

For the constant values which should probably be quoted strings, I see a lot of code like the following -
PHP Code:

if($Using != Starter && $Using != Second && $Using != Third && $Using != Fourth && $Using != Fifth && $Using != Sixth
Unless you have defined constants - Starter, Second, Third, ... this line (and everywhere else in the code) should be like this -
PHP Code:

if($Using != 'Starter' && $Using != 'Second' && $Using != 'Third' && $Using != 'Fourth' && $Using != 'Fifth' && $Using != 'Sixth'
I don't see anything specific elsewhere in the file that would cause the error listed, but start by checking and correcting any errors reported with the above... Even if just a notice error is issued, this is logged and causes a small speed penalty when your code is executed.

Edit: I executed your code and I don't get a parse error. Hmm...

I notice a couple of other things that you need to address -

You are referencing a $_SESSION variable but are not starting a session. While it is possible that your PHP installation is setup to automatically start a session, this is unlikely.

There is no code to connect to a mysql server and select a database. While it is possible you have opened a persistent connection to the mysql server elsewhere, you still need to select a database prior to executing a query.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???

Last edited by mab; 10-07-06 at 09:19 PM.
Reply With Quote