- $optWeek = array(0=>'Please Select');
-
for($i=1;$i<=52;$i++)
-
{
-
$optWeek[$i] = 'Wk - ' . $i;
-
}
-
-
for($i=-1;$i<=0;$i++)
-
{
-
$optYear[date("Y")+$i] = date("Y")+$i;
-
}
-
$optDays = array(
-
'0'=>'Please Select',
-
'SUN' => 'Sunday',
-
'MON' => 'Monday',
-
'TUE' => 'Tuesday',
-
'WED' => 'Wednesday',
-
'THU' => 'Thursday',
-
'FRI' => 'Friday',
-
'SAT' => 'Saturday',
-
);
-
-
-
$form = array(
-
'name' => 'RestDay' ,
-
'id' => 'restday',
-
);
-
-
if(isset($getData[0]['ID'])){
-
foreach($getData as $getDataValues)
-
{
-
$Week = array(
-
'name' => 'Week['.$getDataValues['ID'].']',
-
'value' => '' ,
-
'onchange' => 'getDateOfWeek('.$getDataValues['ID'].');',
-
'id' => 'week'. $getDataValues['ID'],
-
-
);
-
-
-
$EmpDefaultRestDay = array(
-
'name' => 'DefaultRestDay',
-
'value' => (isset($getData[0])?$getData[0]['DefaultRestDay']:''),
-
'maxlength' => '5',
-
'size' => '5',
-
'readonly' => 'readonly',
-
);
-
}
-
}
-
//}
-
echo form_open('restday',$form);
-
echo "<tr><td>";
-
if(isset($getData[0]['ID']))
-
echo form_input(array('name'=>'Year','value'=>$getData[0]['Year'],'readonly'=>'readonly', 'id'=>'year', 'size'=>'5'));
-
else
-
echo form_dropdown('Year',$optYear, (isset($getData[0]['Year'])?$getData[0]['Year']:date("Y")), 'id="year"');
-
echo "</td><td>";
-
echo form_dropdown($Week,$optWeek,$getDataValues['Week']);
-
echo "</td><td>";
-
echo form_input($EmpDefaultRestDay);
-
echo "</td></tr>";
-
echo "</table>";
2 1146
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.
i corrected it is now working.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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:...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
|
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,...
| | |