form for reservation
Moderator: General Moderators
form for reservation
Actually I need a suggestion. I have to do a page about reservation, which is written by PHP.
And I have a form :
+ output all of room, in which is nobody from database in to a table
+ the last collumn of table is date, when traveller come to --> I want display a calendar and I can chose day on this calendar.
Ah, I have tried popup calendar but I have had error.
Anyway, who have a good link for this, so please send me!!!
And I have a form :
+ output all of room, in which is nobody from database in to a table
+ the last collumn of table is date, when traveller come to --> I want display a calendar and I can chose day on this calendar.
Ah, I have tried popup calendar but I have had error.
Anyway, who have a good link for this, so please send me!!!
I have done this, but I got a error : calendar.select :input object passed is not a valid form input object
This is my code :
This is my code :
Code: Select all
<html>
<body>
<FORM name="example" action="../admin/stu_lend.php" method="POST" >
<table border =1 bordercolor="#CC0033" cellspacing=0 cellpading=5>
<?php
db_connect();
$query = "SELECT DISTINCT id_thing,deposit,title,thing_store,place,time_interval
FROM things ";
$result = mysql_query($query)or die(mysql_error());
$num=mysql_numrows($result);
mysql_close();
$i=0;
while($i<$num){
$id_thing=mysql_result($result,$i,"id_thing");
$deposit=mysql_result($result,$i,"deposit");
$title=mysql_result($result,$i,"title");
$thing_store=mysql_result($result,$i,"thing_store");
$place=mysql_result($result,$i,"place");
$time_interval=mysql_result($result,$i,"time_interval");
?>
<tr>
<?php
echo "<td>$thing_store</td>";
echo "<td>$place</td>";
echo "<td>$deposit</td>";
echo "<td>$time_interval</td>";
echo "<td><div align= 'center'> <input type= 'radio' value = '$id_thing' name= 'id_numberRoom'></div></td>";
?>
<td>
<INPUT TYPE="text" NAME="date1" VALUE="" SIZE=10>
<A HREF="#"
onClick="cal.select(document.forms['example'].date1,'anchor1','MM/dd/yyyy'); return false;"
NAME="anchor1" ID="anchor1">vybrat</A>
</td>
<?php
echo "<td><div align= 'center'> <input type= 'radio' value = '$id_thing' name= 'id_numberRoom'></div></td>";
$i++;
}
echo "</tr></table>";
?>
<p></p>
<input type="submit" name="lend" value="Půjčit si">
</form>
<?php
bottom_title();
?>
</body>
</html>I have repaired :
but I have given the same message error
Code: Select all
<html>
<head><SCRIPT LANGUAGE="JavaScript" SRC="../temp/js/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT>
</head><body>
...............
..................
</body>
</html>you probably shouldn't have posted a new topic since this is basically the same as your last topic:
viewtopic.php?t=64486
viewtopic.php?t=64486
I'm sorry. I posted it here because I think I have had problem with code PHP.The Ninja Space Goat wrote:you probably shouldn't have posted a new topic since this is basically the same as your last topic:
viewtopic.php?t=64486
@feyd : I'm sure "cal" has been created in calendar.js