Hi. I am having some problems with my PHP page (maybe because I'm a noob in PHP). Anyway, please see the attached files. When I try to echo the data of EQUIPCODE and ADDDATE, it doesn't show up in the PROCESSFORM page. EQUIPCODE and CURLOC are almost the same scripts, yet CURLOC was able to echo its own data. I've checked all the variables for any syntax error, but they seem all fine. I really don't understand this. Please, could somebody kindly check my scripts and point out what was wrong in it? I would really appreciate it a lot. Thanks in advance.
Notice: Undefined Index: ...
Collapse
X
-
-
Well, I didnt read your files, tried to view your images, didnt help me.
Anyway, Lets do some experience talk
You are trying to access any array index that does not exists.
Example:
Code:<?php $a['fruite'][0]='Apple'; $a['fruite'][1]='Orange'; $a['count']=2; echo $a['fruite'][2]; //you will get undefined Index error. Why? Cause you didnt define index 2; ?>
like
if $a[$id] exists then add $a[$id]=$a[$id]+$New_Value;
else $a[$id]=$New_Value;
in general some programmer(I have seen) they hide all the warning and error in the page and do like this.
Code:$a[$id]=$a[$id]+$New_Value;
use this code
Code:if(isset($a[$id])==true) { $a[$id]=$a[$id]+$New_Value; } else { $a[$id]=$New_Value; }
-
Well, thanks anyway. I was able to solve it, but it was not pretty at all. Maybe I'll just figured it out later. I just need a working database right now. My problem is more on code re-factoring. Thanks again.Comment
Comment