473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Notice: undefined index: dec in...

I am making changes to a php framework I downloaded and am new to PHP.

I have this error:

Notice: Undefined index: dec in D:\Hosting\4156690\html\idingo\modules\groups\grou p_sort.php on line 49

Line 49 looks like this:


Expand|Select|Wrap|Line Numbers
  1.         if (myNum($groupsSelect) > 0) {
  2.  
  3.             $this_counter= 0;
  4.  
  5.             for ($i = 0; $i <myNum($groupsSelect) ; $i++)    {
  6.  
  7.                 $groups=myF($groupsSelect);
  8.                 $this_counter++;
  9.     49--->        $counter_of_thumbs=$_GET['dec'];
  10.                 $upper_limit=$counter_of_thumbs+10;
  11.  
  12.                 if ($this_counter>$counter_of_thumbs && $this_counter<=$upper_limit)    {
  13.  
  14.                     $statsSelect = myQ("SELECT `comments`,`gallery`,`users` FROM `[x]groups` WHERE `idgroups`='".$groups[4]."' ");
  15.                     $statsArray=myF($statsSelect);
  16.                     $galleryArray=unpk($statsArray[1]);
  17.                     $usersArray=unpk($statsArray[2]);
  18.                     $commentsArray=unpk($statsArray[0]);
  19.  
  20.                 if (is_array($usersArray))    {
  21.  
  22.                     $member_num=sizeof($usersArray);
  23.  
  24.                 }
I am not sure how this works. I am assuming I haven't defined this variable but I have no idea where this definition would be done.

Thank you for any help you may give.
Mar 10 '10 #1
1 1771
Dormilich
8,658 Expert Mod 8TB
it would be done in the URL. best practice is to test any of the Superglobals ($_GET, $_POST, $_SESSION, $_COOKIE, etc.) before accessing the value.
Expand|Select|Wrap|Line Numbers
  1. if (!isset($_GET['dec'])
  2. {
  3.     // do error handling
  4. }
Mar 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: jsgoodrich | last post by:
I am looking for some help if anyone can lend a hand. I have a simple php website that displays a table from my mysql database. To prep for my MCSE I moved my home server to Windows 2003...
3
by: number1yan | last post by:
Can anyone help me, i am creating a website and am using a php script that recomends the website to other people. I keep getting the same error and can not work out why. The error is: Notice:...
2
by: Reggie | last post by:
am trying to create a a upload file.am uploading files ok but i recieve this message. Notice: Undefined variable: uploaded_size in /home/fhlinux169/c/ clashoff.co.uk/user/htdocs/upload.php on...
3
by: sickboy | last post by:
$channels=$_GET; if (empty($channels)) { $channels='blank'; } changechannels($channels); $theatre=$_GET; if (empty($theatre)) { $theatre='splash'; } changetheatre($theatre); $info=$_GET; if...
5
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
1
by: francsutherland | last post by:
Notice: Undefined index: send in D:\Domains\workingdata.co.uk\wwwroot\contact_text.php on line 7 Hi, I've started getting this error in the contact page form of my website. The web hosting...
10
by: FutureShock | last post by:
I have since recently turned up my error reporting on a production site to E_ALL to ensure I am using 'best practices' when writing out code. So far it has helped me discipline myself with...
11
by: stealthmode666 | last post by:
New to .php so need script help. I want to know how to stop this being displayed when I click submit. Notice: Undefined index: homeowner in E:\domains\r\...\user\htdocs\...\form.php on line 166 ...
4
by: complearn | last post by:
Do you know why I got these errors for status_bar.php in some webhost, but work perfectly on other webhost? Whats wrong? here are the codes from line 18, our webhost is running php5. ...
2
by: Smellydog | last post by:
I'm having a strange issue with PHP version 5.2.8 running on Windows Vista with Lighttpd. I receive a Notice that says the following: Notice</b>: Undefined index: name in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.