need to display items to show like in demo

need to display items to show like in demo

Postby xtophe » Thu Nov 26, 2009 9:23 am

Hi eveybody... i a newbie in web development :) ... i found this calendar very helpfull... i have a booking for with three type of room ... i would like to show the availability of each room... perhaps like in the demo..."items to show".... anyone can help me...... thx....
xtophe
 
Posts: 1
Joined: Thu Nov 26, 2009 9:19 am

Re: need to display items to show like in demo

Postby chris » Thu Nov 26, 2009 10:29 am

Hi there and welcome.

This topoc has actually been covered many times in this forum and is actually quite simple.

Take a look at this thread: viewtopic.php?f=9&t=58
I hope you can follow the steps there.

I would modify just one thing from that thread, in the "select" code we have this:
Code: Select all
<select name="id_item">
<?php
foreach($items as $id=>$title){
echo '<option id="'.$id.'">'.$title.'</option>';
}
?>
<select>

That would be better being like this:
Code: Select all
<select name="id_item">
<?php
foreach($items as $id=>$title){
echo '<option id="'.$id.'"'; if(ID_ITEM==$id) echo 'selected="selected"'; echo '>'.$title.'</option>';
}
?>
<select>

That will "remember" the current item in the select list.
Let me know if you need further help :)

Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest