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.
calendar
Moderators: egami, macek, gesf
Try taking a look here: (Commercial) http://www.phpjabbers.com/php-booking-scripts
or here: (Free) http://scripts.filehungry.com/product/p ... ng_system/
or here: (Free) http://scripts.filehungry.com/product/p ... ng_system/
-
- New php-forum User
- Posts: 22
- Joined: Fri Jun 22, 2012 9:14 am
Sorry,
but i am not getting that type of calendar format.
but i am not getting that type of calendar format.
-
- New php-forum User
- Posts: 22
- Joined: Fri Jun 22, 2012 9:14 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.
<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 57 times
-
- php-forum Fan User
- Posts: 973
- Joined: Mon Oct 01, 2012 12:32 pm
The way that I do that is with a ternary operation, for example...
that way, the php conditionally disables the input if $oneway equals 1.
Code: Select all
<input type="text" name="whatever" <?php echo ($oneway==1)?'disabled="disabled"':'' ?>/>