Hello,
In the manage_credit_cards.php, I have a table of credit cards listed for a particular customer. In each row, an edit link, delete link, credit card number, expiry date and expiry status is displayed. When the customer wants to edit the credit card details, he/she will click on the edit link on the same row.
My question is when the customer clicks on the edit link, how can I assign the $row details to session variables?
I don't think an onclick event handler for <a href> will work here coz' that will mix up javascript (client side) and php (server side).
the code in red is where I want to assign the $row details to session variables.
can anyone please?
the following is my code:
<table cellpadding="3" style="width:98%;">
<tr class="column_names" bgcolor="#cccccc" align=center>
<th>Edit</th>
<th>Delete</th>
<th>Credit Card</th>
<th>Expiry Date</th>
<th>Expired?</th>
</tr>
<?php
while($row = mysql_fetch_array($result))
{
print
"<tr>
[COLOR="Red"]<td width='10%'><a href='cr_card_disp.php?action=update_cr_card'>Edit</a></td>[/COLOR]
<td width='10%'><a href='cr_card_disp.php'>Delete</a></td>
<td width='30%'>".$row["cr_card"]."***********".$row["cr_no"]."</td>
<td width='20%'>" .$row['exp_mth']."/".$row['exp_yr']."</td>
<td width='30%' style='color:#ff0000;'>".$_SESSION['expiry_msg']."</td>
</tr>
<tr>
<td colspan='5'>
<hr size='1'>
</td>
</tr> ";
}//END OF WHILE LOOP
print '</table>';
thank you!