Pako
Staff Emeritus
		- 16,455
 

- NW Montana
 
- GTP-Pako
 
- GTP Pako
 
I am very new to this whole PHP/MySQL relationship, but managed to create my first Database, and can even bring up some of the date, as well as add additional records through the use of a form.  My problem is trying to figure out, or more so, how to code a "Delete" link which can sit next to each record in the table to allow a admin user to simply hit the "Delete" link and the page would refreash with that particular record gone.
Here is the code I have so far for the dynamic table that's pulling data from my 'event_dates' table.
	
	
	
		
The uploaded file can be found here:
www.blueonion.net/php/private/update2.php
Any and all help would be greatly appreciated. I have spent a week for each extra moment I have combing the web for answers with no result.

	
		
			
		
		
	
				
			Here is the code I have so far for the dynamic table that's pulling data from my 'event_dates' table.
		PHP:
	
	<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr bgcolor="#000000"> 
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">Record 
      ID</font></td>
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">Event 
      Date</font></td>
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">Venue</font></td>
    <td width="200"><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">Description</font></td>
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">City</font></td>
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">State</font></td>
    <td><font color="#999999" size="2" face="Arial, Helvetica, sans-serif">Starting 
      Time</font></td>
    <td><font color="#999999">Remove</font></td>
  </tr>
  <?php do { ?>
  <tr bgcolor="#CCCCCC"> 
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['counter']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['event_date']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['venue']; ?></font></td>
    <td width="200"><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['description']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['city']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['state']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><?php echo $row_all_records['event_time']; ?></font></td>
    <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"><a href="update2.php"></a></font></td>
  </tr>
  <?php } while ($row_all_records = mysql_fetch_assoc($all_records)); ?>
</table>
	The uploaded file can be found here:
www.blueonion.net/php/private/update2.php
Any and all help would be greatly appreciated. I have spent a week for each extra moment I have combing the web for answers with no result.