Menu

#6 Undefined Index Errors

open
nobody
None
5
2006-08-20
2006-08-20
Anonymous
No

I am using the following development environment:
Apache: v.2.0.55
PHP: v. 5.1.0
MySQL: 5.0.11

I am having an undefined index problem throughout the
application.

"Notice: Undefined index: position in D:\Apache2
\htdocs\newsmanager\login\header.php on line 80"

I can trace everything back to the following process.

(1) Query the datase and throw everything back into
this variable $img_res__. The Undefined
index: 'position' is one of the fields in the
interface table.

$img_qry_="SELECT * FROM interface";
$img_res__=$pg_sql->query_pass($img_qry_,"4")

(2) Intialize a variable $uu and count the records in
the $img_res__

for($uu=0; $uu<count ($img_res__); $uu++)

(3) Now for the error.
{
if
(trim($img_res__[$uu]['position'])=="left")
{
$img_id__=$img_res__[$uu]['id'];
$img_path__=explode(".",$img_res__[$uu]['image']);
$left_img__=$img_id__.".".$img_path__[1];
$left_url="";
}

Can anyone offer any assistance?

Thanks.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.