Jump to content

trying to use ThickBox and pass ID through?!


jarv

Recommended Posts

in my code below $_SESSION['id'] = the last ID number in my recordset?!

 

Please help, I think I need to put my <div id="myOnPageContent"> bit inside my loop?!

 

 

 

<?php
							$bookingstotal = 0; 
							while($row1 = mysql_fetch_array($result))
								{
									$bookingstotal += intval($row1['booking_total']);
									echo '<tr>';
									echo '<td><a href="view-booking.php?id='.$row1['id'].'" title="View booking details">'.$row1['id'].'</a></td>'; 
									echo '<td>'.$row1['customer_name'].'</td>'; 
									echo '<td>'.$row1['customer_phone'].'</td>';
									echo '<td>'.$row1['customer_notes'].'</td>';
									if($row1['booking_status'] == 'pending'){
									echo '<td><div class="backorange">'.$row1['booking_status'].'</div></td>';
									} else if($row1['booking_status'] == 'confirmed'){
									echo '<td><div class="backgreen">'.$row1['booking_status'].'</div></td>';
									} else if($row1['booking_status'] == 'cancelled'){
									echo '<td><div class="backgrey">'.$row1['booking_status'].'</div></td>';										
									}
									echo '<td><input alt="#TB_inline?height=300&width=400&inlineId=myOnPageContent&id='.$row1['id'].'" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Add Note" /></td>';
									echo '<td>'.date('d F, Y ', strtotime($row1['booking_date'])).'</td>';
									echo '<td>
									<!-- Icons -->
									 <a href="resources/pdf/'.$row1['customer_name'].$row1['id'].'.pdf" target="_blank" title="View Policy Document"><img src="resources/images/pdf_icon.jpg" alt="View Policy Document" /></a>';
									echo '<a href="edit-booking.php?id='.$row1['id'].'" title="Edit"><img src="resources/images/icons/pencil.png" alt="Edit" /></a>
									 <a href="javascript:confirmationbooking('.$row1['id'].')" title="Delete"><img src="resources/images/icons/cross.png" alt="Delete" /></a> 									
									 </td>';
									echo '</tr>';
									$_SESSION['id'] = $row1['id'];
								}
							?>
						</tbody>
						<tr>
							<td>Bookings: <strong><?php echo $total_pages;?></strong></td>
							<td></td>
							<td><strong>Totals:</strong></td>
							<td colspan="2"> </td>
							<td><strong>£<?php echo number_format($bookingstotal, 2, '.', ''); ?></strong></td>
							<td colspan="2"></td>
						</tr>

					</table>
					<div id="myOnPageContent">
						<form action="#" method="post" name="add note">
							<table>
								<tr>
									<td valign="top">Note:</td>
									<td><textarea name="AdditionalNote" rows="15" cols="40"></textarea></td>
								</tr>
								<tr>
									<td><input type="hidden" name="booking_id" value="<?php echo $_SESSION['id'];?>" /></td>
									<td><input type="submit" value="Add Note" /></td>
								</tr>
							</table>
						</form>
					</div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.