Which database you are using, do you put connection of DB in page?

Very nice Tutorial. please mark it as solved.

please use for each loop in this case. Thanks

how you write check box code, please just write code for checkbox.

problem solved, I just copy instantclient contents to apche/bin folder. and its working

PHP info not showing version of OCI Instant Client in my PHP Info. I do not know why even though oci8 extension enabled,

Whenever I tried to access Oracle DB from PHP , it shows error
Everything is ok, Path is okay. I changed php.ini file to. I am using old version of xampp

Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in E:\xampp\htdocs\Fuel\Fuel\server\inspur2.php on line 6

Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in E:\xampp\htdocs\Fuel\Fuel\server\inspur2.php on line 7

Warning: ocierror() [function.ocierror]: OCIError: unable to find error handle in E:\xampp\htdocs\Fuel\Fuel\server\inspur2.php on line 7

Thanks.

How to Print Documents via just one click

Hi, I have Folder Which Name is LAPO and There are three Folders insider whihc names are North, Central and South.
In North Folder there are many Folders Like 9876 , 9877 , 9333, 9853 etc.
In all Folders there are files Named PO.pdf
There are more then 1400 Folders in North Folder and I want to print all PO.PDF Files of North Folders
Path will be LAPO/North/9876/PO.Pdf
How I can Print all documents by just one instruction or one click and all pages will be printed via printer.
All numeric ocdes like 9876 are also present in database (MySQL)

I convert the file names according to my needs and save in DB without spaces.

[QUOTE=ardav;1535126]You don't have to have http:// in the href.

The space shouldn't be there. Filenames should not have spaces in them. I'd go at it to change them - change them from space to underscore or similar.[/QUOTE]

any encoding Technique will work ????

[QUOTE=vibhadevit;1535074]I think its not because of space.
Your href link must start with http:// to work in browser.
When you click on link what is url shown in browser?[/QUOTE]

My link starts with http:// then local ip then this part /PEDB

as PEDB in root so I do not required to write Http , browser adds automatically

Please guide me in this issue...

[QUOTE=jigarvyas;1534781]I think this is what you are looking for
[CODE]
$a = "/PEDB/SupportDoc/5/PRFF or0444.pdf";
$b = urlencode($a);
echo "Click";
[/CODE][/QUOTE]

When i did this it shows
/PEDB/%2FPEDB%2FSupportDoc%2F5%2FPRFFor0444.pdf

Any other idea?

I saved the link refrence in Databse like /PEDB/SupportDoc/5/PRFF or0444.pdf
and used [ICODE]View[/ICODE]
to show the documents but when I click on view its not showing document because link break where space put in and show blank in explorer like /PEDB/SupportDoc/5/PRFF

if [CODE]alert(firstDate);[/CODE] it show one month plus

I just want to check why loop is not adding correct values, also if alert Loop date it shows 1 may , may be this is issue

This code is working fine but there are 2 issues

If [ICODE]days_between(2011,04,01,2011,04,01); [/ICODE] it shows [B][COLOR="Red"]0 working days[/COLOR][/B] even on first April its Friday

if [ICODE]days_between(2011,04,02,2011,04,03); [/ICODE] means Sat and Sun, it shows 2 Calendar days , OK [B][COLOR="Red"]but one working Day[/COLOR][/B].

[CODE]

function days_between(fryear,frmonth,frday,toyear,tomonth,today) { var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var firstDate = new Date(fryear,frmonth,frday); var secondDate = new Date(toyear,tomonth,today); var loopDate=new Date(); loopDate=firstDate; var caldays=0; var wkdays=0; for(i=0;loopDate

[QUOTE=urtrivedi;1529006]when user submit data, accept only from date, to_date, then in processing form , before inserting we can find working days using php/mysql syntax.[/QUOTE]

I have designed form , But I am confused,

Also , Is my idea is ok?

I want to do it using Jquery or Javascrip, in Below code I calculated calendar Days, How I find Working Days??? also I need to change date format from 2011,04,17 to 2011-04-17

[CODE]

function days_between() { var oneDay = 24*60*60*1000; // hours*minutes*seconds*milliseconds var firstDate = new Date(2011,04,01); var secondDate = new Date(2011,04,17); var diffDays = Math.abs((firstDate.getTime() - secondDate.getTime())/(oneDay)); alert(diffDays+1); } document.write(days_between());

[/CODE]

I use this as a date picker in my form [CODE]http://jqueryui.com/demos/datepicker/[/CODE]

I do not want to make it so complex, I will use Just 2 Table ,

  1. Table1: Leaves Balance (Employee Id, Name, Casual, Annual, Medical , Type of Employee)
  2. Table2: Leave Used ( Employee Id, Leave Type, Start Date, End Date , Calender Days, Working Days)

When Ever Person apply for Leaves all info inserted in Table1 and Table2 Updated.

Example:
[QUOTE]
Table1 (Leave Balance) Before Apply
Employee Id /// Name, /// Casual /// , Annual,/// Medical , /// Type of Employee
3 /// ABC /// 10 /// 14 10 Permanent
[/QUOTE]
( If Person apply from 2011-04-07 to 2011-04-11 , working days are 3 and calender Days are 5 and Mark as Annual)

When Person Apply 2 Things Must Happened

Table1 (Leave Balance) After Apply (Annual Fields Updated from 14 to 11)
Employee Id Name, Casual , Annual, Medical , Type of Employee
3 ABC 10 11 10 Permanent

And Table2 (Leave Used ) After Apply ( 1 record inserted)

Employee Id, Leave Type, Start Date , End Date , Calender Days, Working Days
3 Anual 2011-04-07 2011-04-11 5 3

Only difficulty I feel to make a form.

Hi, I want to make a form , in which I have 4 input Fields.

• Date1
• Date2
• Calender Days (automatic get value after Date2 Entered)
• Working Days (automatic get value after Date2 Entered)

When I enter date1 as 2011-04-07 and date2 as 2011-04-11

Then I require in Calender Days = 5 inclusive of date1 and ...

Hi, I want to make a form , in which I have 4 input Fields.

[LIST=1]
[]Date1
[
]Date2
[]Calender Days
[
]Working Days
[/LIST]

When I enter date1 as 2011-04-07 and date2 as 2011-04-11

Then I require in Calender Days = 5 inclusive of date1 and date2

and Working days = 3 as SAT, SUN Off

Thanks Friend, PayretDate is not important in this case, thanks.

Procedure is to submet Payments in Payable department, and check how many days Payable take to give payments.
3 fields are important for this issue.
[LIST=1]
[]SubPayDate // when payment submetted to paybale
[
]PayRetDate // When Payment return from paybale to our department
[*]ResubPayDat // aganin resubmitted to payable
[/LIST]

If payment submet to finance and not return then its straight forward to calculate days by getting the difference from current day.
But in case payment submet and return and then again resubmitted then i need to check the delay from the resubpaydat for delay , and ignore subpaydate.

Table structure and sample data
[CODE]--
-- Table structure for table invmain

CREATE TABLE IF NOT EXISTS invmain (
SRNo int(6) NOT NULL AUTO_INCREMENT,
PONos varchar(10) NOT NULL,
CRNo varchar(10) NOT NULL,
ContractRefNo varchar(60) NOT NULL,
Region varchar(5) NOT NULL,
VenName varchar(100) NOT NULL,
InvoiceNature varchar(200) NOT NULL,
InvNo varchar(100) NOT NULL,
InvDate date NOT NULL,
InvMonth varchar(40) NOT NULL,
InvAmount double NOT NULL,
RecONMDate date NOT NULL,
SentRegVerDate date NOT NULL,
RegVerRecDate date NOT NULL,
SubPayDate date NOT NULL,
PayRetDate date NOT NULL,
ResubPayDate date NOT NULL,
RealPAyDAte date NOT NULL,
Remarks varchar(250) NOT NULL,
Status varchar(30) NOT NULL,
User varchar(50) NOT NULL,
Time time NOT NULL,
Date date NOT NULL,
CurrencyA varchar(3) NOT NULL,
PRIMARY KEY (SRNo)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1798 ;

--
-- Dumping data for table invmain

INSERT INTO invmain (SRNo, PONos, CRNo, ContractRefNo, Region, VenName, InvoiceNature, InvNo, InvDate, InvMonth, InvAmount, RecONMDate, SentRegVerDate, RegVerRecDate, ...

I use this query but its not working
[CODE]SELECT SRNo , Submet , CASE days
WHEN Submet != '0000-00-00' THEN TO_DAYS( NOW( ) ) - TO_DAYS( Submet ) as Days
ELSE TO_DAYS( NOW( ) ) - TO_DAYS( Resubmitted ) as Days
END
FROM invmain
WHERE Status = 'SENT TO PAYABLE'
AND Submet != '0000-00-00'[/CODE]

but its giving error

Hi, I have 3 feilds in my invoice processing Table.
[LIST=1]
[]Submet
[
]Return
[*]Resubmitted
[/LIST]

Now I am using this query
[CODE=mysql]SELECT SRNo , VenName , Submet , TO_DAYS( NOW( ) ) - TO_DAYS( Submet ) AS Days
FROM invmain
WHERE Status = 'SENT TO PAYABLE'
AND Submet != '0000-00-00'
ORDER BY Days DESC [/CODE]

But this query give me result only on base of Submet.
But I need result on Resubmitted also when its resubmitted.
I need below mentioned Results...

if Submet date is 2011-03-22 this will show days pending 2.
But if Submet is 2011-03-10, but it will return and then resubmitted on 2011-03-20 then it give result 14 instead of 4 days

I am also facing this Problem, and no help is found these days

I am here with a hope someone can give me any clue about my issue.

Anyone can have any idea about it, I am using win32 but even though its not working

Email working Fine, I can also add Cc using custom Header, But Email is not sending to Cc Addresses

Also, I want to know that I am using Windows 2003 Server and XAMPP with PHP Mailer and SMTP Authentication. Why its giving error
[CODE]this function works with the SMTP mailer on win32, not with the "mail" mailer.[/CODE]