?
Solved

php4 array worked, now with 5 it doesnt.

Posted on 2007-03-24
4
Medium Priority
?
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Starting up a Project

764 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