Wrox Programmer Forums
|
BOOK: Dreamweaver MX: PHP Web Development
This is the forum to discuss the Wrox book Dreamweaver MX: PHP Web Development by Gareth Downes-Powell, Tim Green, Bruno Mairlot; ISBN: 9780764543876
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Dreamweaver MX: PHP Web Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2006, 02:33 PM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default booking details issue

Greetings;

Don't know if anyone is alive here at all, but here goes;

I'm working through this book using Dreamweaver 8, PHP 5 and MySQL 4.1 on Linux.

Everything is going pretty well, except with this problem;

I created my booking_details form and it works. However, I've noticed that the insert isn't working with two rows that use integers in their data.

Specifically roomOptions and networkOptions, PC.

Neither of those two rows are getting input from the applicable form fields, even when checked.

I'm pretty sure I followed the instructions properly (everyone says that I know), but I'm serious. I think the real issue is that I'm not smart enough to figure what the solution is on my own.

Anyway here is what my table looks like in the database;

mysql> describe bookings;
+-------------------+--------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+------------+----------------+
| ID | tinyint(11) | | PRI | NULL | auto_increment |
| roomID | tinyint(11) | | | 0 | |
| clientID | tinyint(11) | | | 0 | |
| startDate | date | | | 0000-00-00 | |
| endDate | date | | | 0000-00-00 | |
| adults | int(11) | | | 1 | |
| children | int(11) | | | 0 | |
| roomType | varchar(30) | | | | |
| roomOptions | int(8) | | | 0 | |
| networkConnection | int(8) | | | 0 | |
| PC | int(8) | | | 0 | |
| requirements | varchar(250) | | | | |
+-------------------+--------------+------+-----+------------+----------------+

And here is the relevant part of the form, any help offered, will be extremely appreciated.

<td><div align="right">Is Room Extras Required: </div></td>
  <td><div align="left">
   <label>
   <input <?php if (!(strcmp($row_rsBooking['networkConnection'],1))) {echo "checked=\"checked\"";} ?> name="networkconnection" type="checkbox" id="networkconnection" value="1">
Network Connection
<br>
<input <?php if (!(strcmp($row_rsBooking['PC'],1))) {echo "checked=\"checked\"";} ?> name="PC" type="checkbox" id="PC" value="checkbox">
   </label>
PC</div></td>
 </tr>
 <tr>
  <td><div align="right"></div></td>
  <td><div align="left"></div></td>
 </tr>
 <tr>
  <td><div align="right">Number of Adults: </div></td>
  <td><div align="left"><?php echo $row_rsBooking['adults']; ?></div></td>
 </tr>
 <tr>
  <td><div align="right">Number of Children: </div></td>
  <td><div align="left"><?php echo $row_rsBooking['children']; ?></div></td>
 </tr>
 <tr>
  <td><div align="right">Room Optons: </div></td>
  <td>
<div align="left">
 <p>
  <label>
   <input <?php if (!(strcmp($row_rsBooking['roomOptions'],"0"))) {echo "checked=\"checked\"";} ?> type="radio" name="roomOptions" value="0">
   Smoking</label>
  <br>
  <label>
   <input <?php if (!(strcmp($row_rsBooking['roomOptions'],"1"))) {echo "checked=\"checked\"";} ?> type="radio" name="roomOptions" value="1">
   Non-Smoking</label>
  <br>
 </p>
</div></td>
  </tr>
 <tr>
  <td><div align="right">Special Requirements: </div></td>
  <td><div align="left"><?php echo $row_rsBooking['requirements']; ?></div></td>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Appointment Booking KDSTECH BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 May 29th, 2008 12:46 AM
Appointment booking philblack1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 25th, 2008 01:17 PM
booking system newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 July 19th, 2007 04:17 PM
booking form LITOTES PHP How-To 2 June 4th, 2003 03:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.