calendar

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

BandanaChaudhury
New php-forum User
New php-forum User
Posts: 22
Joined: Fri Jun 22, 2012 9:14 am

calendar

Postby BandanaChaudhury » Sat Nov 03, 2012 11:05 pm

I am doing flight booking,
and i want pop-up calender for that, similar like in travel agency websites like makemytrip, and more.
with departure and return dates.
and when its one way, the return calender is disables...
and all other features.
I searched but most of them are in jsp,
i want the code in php.

MeroD
New php-forum User
New php-forum User
Posts: 53
Joined: Wed Oct 10, 2012 12:14 am

Re: calendar

Postby MeroD » Sun Nov 04, 2012 12:26 am


BandanaChaudhury
New php-forum User
New php-forum User
Posts: 22
Joined: Fri Jun 22, 2012 9:14 am

Re: calendar

Postby BandanaChaudhury » Tue Nov 06, 2012 7:53 am

Sorry,
but i am not getting that type of calendar format.

BandanaChaudhury
New php-forum User
New php-forum User
Posts: 22
Joined: Fri Jun 22, 2012 9:14 am

Re: calendar

Postby BandanaChaudhury » Tue Nov 06, 2012 8:55 am

<table>
<form action='tdomestic.php' method='POST'>
<tr>
<td><strong>Type</strong></td>
<td>One-way Trip</td>
<td><input type='radio' name='trip' value='Oneway' checked='checked'></td>
<td>Round Trip</td>
<td><input type='radio' name='trip' value='Round'></td>
</tr>
</form>
</table>


the .zip file have a calender folder having a date.php file, its working fine,
i need to change something in that.
like if i have the submitted value='Oneway'(from above code), then in the date.php file the to-date must be disable, and for the value='Round', we should enter both the dates.
Can you please help me with the extra code i have to add up.
Attachments
calendar.zip
(193.18 KiB) Downloaded 20 times

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: calendar

Postby seandisanti » Wed Nov 07, 2012 3:02 pm

The way that I do that is with a ternary operation, for example...

Code: Select all

<input type="text" name="whatever" <?php echo ($oneway==1)?'disabled="disabled"':'' ?>/>

that way, the php conditionally disables the input if $oneway equals 1.


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest