Solved

php4 array worked, now with 5 it doesnt.

Posted on 2007-03-24
4
195 Views
Last Modified: 2010-04-16
php5
RHEL 5
PHP Notice:  Undefined offset:  0 in /usr/me/index.php on line 18, referer:
Line 18 is if (is_array($myDB->row[0])){
==========================================================================================

$myDB = new DB($server,$database);
                $myqry = "SELECT * FROM _Users where Usr_Email = '$email' and Usr_Pass = '$pass'";
                $results = $myDB->DB_execute($myqry, "view");

                if (is_array($myDB->row[0])){

                        setcookie("Usr[ID]", $myDB->row[0][0]);
                        setcookie("Usr[Fname]", $myDB->row[0][1]);
                        setcookie("Usr[Lname]", $myDB->row[0][2]);
                        setcookie("Usr[Email]", $myDB->row[0][3]);
                        setcookie("Usr[Archive]", 0);

0
Comment
Question by:ucfperson
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:gatorvip
ID: 18793906
What is the relevant code for the DB class?
Are you connecting properly?
Does DB have a variable called "row"?

...
0
 

Author Comment

by:ucfperson
ID: 18794503
class DB {
         
          var ........
          var $row=array()

I am connecting properly.
0
 
LVL 20

Accepted Solution

by:
gatorvip earned 500 total points
ID: 18795813
it's hard to guess without seeing any actual code (for example: how do you populate myDB->row[0],  how do you know that myqry returns valid results, etc).
0
 

Author Comment

by:ucfperson
ID: 18796227
Fixed it,   moved the pages from php4 to php5 and the database,   the passwds needed to be re encrypted.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 64
autoit - check if option is checked in another program 2 111
creating threads in delphi 1 82
parse convert xml feed to text (python) 2 70
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
This article will show, step by step, how to integrate R code into a R Sweave document
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now