Jump to content

[SOLVED] How do I grab this Link ID?


boney alex

Recommended Posts

Hi all, very new to PHP and I've got a dead simple question. Ive managed to display my records in a table, with a link called 'Cancel' next to get row. When the user selects cancel I would like to open cancel.php and gather all the information regarding the ID for that row. I have the following code:

<?php
while ($reservation = mysql_fetch_array($query)) { 
$reservationid = $reservation['ReservationID']; 
$make = $reservation['Make']; 
$model = $reservation['Model']; 
$spec = $reservation['Specification']; 
$collectiondate = $reservation['Collection_Date']; 
$returndate = $reservation['Return_Date']; 
$cost = $reservation['Cost']; 
echo (" 
<tr> 
<td> <font face=Arial>$reservationid</font> 
</td> 
<td> <font face=Arial>$make</font> 
</td> 
<td> <font face=Arial>$model</font> 
</td> 
<td> <font face=Arial>$spec</font> 
</td> 
<td> <font face=Arial>$collectiondate</font> 
</td> 
<td> <font face=Arial>$returndate</font> 
</td> 
<td> <font face=Arial>$cost</font> 
</td>
<td> <a href=\"cancel.php?id=$reservationid\">Cancel</a>
</td>  
</tr>
?> 

 

On cancel.php, how do I get the id=$reservationid???

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/46714-solved-how-do-i-grab-this-link-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.