473,396 Members | 2,002 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,396 software developers and data experts.

i don't seem to find error, Undefined variable: EmpDefaultRestDay,week&getDataValues

Expand|Select|Wrap|Line Numbers
  1. $optWeek = array(0=>'Please Select');
  2. for($i=1;$i<=52;$i++)
  3. {
  4. $optWeek[$i] = 'Wk - ' .  $i;
  5. }
  6.  
  7. for($i=-1;$i<=0;$i++)
  8. {
  9. $optYear[date("Y")+$i] =  date("Y")+$i;
  10. }
  11. $optDays = array(
  12.     '0'=>'Please Select',
  13.         'SUN'  => 'Sunday',
  14.         'MON'  => 'Monday',
  15.         'TUE'  => 'Tuesday',
  16.         'WED'  => 'Wednesday',
  17.         'THU'  => 'Thursday',
  18.         'FRI'  => 'Friday',
  19.         'SAT'  => 'Saturday',
  20. );
  21.  
  22.  
  23. $form = array(
  24.         'name'        => 'RestDay' ,
  25.     'id'        => 'restday',
  26. );
  27.  
  28. if(isset($getData[0]['ID'])){
  29. foreach($getData as $getDataValues)
  30. {
  31. $Week = array(
  32.         'name'          => 'Week['.$getDataValues['ID'].']',
  33.         'value'         => '' ,
  34.     'onchange'    => 'getDateOfWeek('.$getDataValues['ID'].');',
  35.     'id'        => 'week'. $getDataValues['ID'],
  36.  
  37. );
  38.  
  39.  
  40. $EmpDefaultRestDay = array(
  41.         'name'          => 'DefaultRestDay',
  42.         'value'         => (isset($getData[0])?$getData[0]['DefaultRestDay']:''),
  43.         'maxlength'     => '5',
  44.         'size'          => '5',
  45.         'readonly'      => 'readonly',
  46. );
  47. }
  48. }
  49. //}
  50. echo form_open('restday',$form);
  51. echo "<tr><td>";
  52. if(isset($getData[0]['ID']))
  53. echo form_input(array('name'=>'Year','value'=>$getData[0]['Year'],'readonly'=>'readonly', 'id'=>'year', 'size'=>'5'));
  54. else 
  55. echo form_dropdown('Year',$optYear, (isset($getData[0]['Year'])?$getData[0]['Year']:date("Y")), 'id="year"');
  56. echo "</td><td>";
  57. echo form_dropdown($Week,$optWeek,$getDataValues['Week']);
  58. echo "</td><td>";
  59. echo form_input($EmpDefaultRestDay);
  60. echo "</td></tr>";
  61. echo "</table>";
Nov 24 '15 #1
2 1146
Dormilich
8,658 Expert Mod 8TB
the first two are conditional variables. i.e. they only exist if a specific condition is met.

for anything more detailed we’d need the full error message.
Nov 25 '15 #2
i corrected it is now working.
Nov 30 '15 #3

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

Similar topics

3
by: Dan Finn | last post by:
OpenBSD 3.2 Apache 1.3.26 PHP 4.3.4 PHP-Nuke 6.9 getting these in the apache error log: Sun Nov 16 20:20:16 2003] PHP Notice: Undefined variable: HTTP_USER_AGENT in...
3
by: Jason | last post by:
hello, i am new to PHP, so go easy. I am using the examples in the book: PHP: Your Visual Blueprint For Creating Open Source, Server Side Content In the section where they talk about...
3
by: bissatch | last post by:
Hi, I get the following error: Notice: Undefined variable: end_while in C:\Program Files\Apache\Apache2\htdocs\csp\inc\xmlmenu.php on line 102 This is a script that works on the server...
10
by: Chuck | last post by:
Hi! Any ideas as to how I can get ride of the script error undefined variable "Exp_Month"? I am trying to get this drop down list to default to the current month as opposed to 01. Thank...
4
by: Chris Beall | last post by:
If you want your code to be bulletproof, do you have to explicitly check for the existence of any possibly-undefined variable? Example: window.outerHeight is defined by some browsers, but not...
2
by: josel119 | last post by:
Hi everyone, Im a php newbie jejeej . Im getting the following error undefined variable at line 19 , I verified the php.ini and I dont know what else I can do. Im working on IIS with windows...
2
by: Bob Bruyn | last post by:
I've recently installed Apache 2 and php 5.2 on my WIndows XP machine. Everything is up and running. I'm passing some vars via the URL. It works fine online:...
1
by: bob johnson | last post by:
Notice: Undefined variable: db_host in C:\wamp\www\cbmall\index.php on line 7 Notice: Undefined variable: db_user in C:\wamp\www\cbmall\index.php on line 7 Notice: Undefined variable: db_pass...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.