Indefined Variable

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am doing a Migration of a site originally on php 4 now on 5.3.  I am
getting tons of undefined indexes and undefined variables.  I am
really just having trouble on the undefined variables.  The line that
is giving me trouble is:

"WHERE uid=".$account->q_id($HTTP_VARS['username'])."\n".

The  $HTTP_VARS is undefined.  How do I define it?

        function check_course_access($course)
                $account = new Account_Obj(array());
                if ($account->q_priv(array('Production',
'Accounting'))) {
                        return true;

                $sql = "SELECT * FROM demo\n".
                           "WHERE uid=".$account-
Quoted text here. Click to load it
                           "     AND CURRENT_TIMESTAMP < \"end\"";
                $res = db_exec($sql);
                if (db_numrows($res) > 0) {
                        $sql = "SELECT id FROM lessons\n".
                                   " WHERE'".db_format($course)."'\n".
                                   "      AND\n".
                                   "      AND demo='t'";
                        $res = db_exec($sql);
                        if (db_numrows($res) > 0) {
                                return true;

Re: Indefined Variable

TaylorMade wrote:
Quoted text here. Click to load it

<code snipped>

How did you define it in the first place?  AFAIK this never was a
predefined variable in PHP.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline