> I made little guest book application, and options are add, view and now I
> want to delete a record I put the delete link on every record, now here
> I'm stuck how to pass the record variable to the delete.php file.

<a href="" record #1231</a>

<?php // filename: delete.php
  if (isset($_REQUEST['id']) && (int)$_REQUEST['id']>0)
  {
    $id=(int)$_REQUEST['id']+0;
    $sql='delete from mytable where id='.$id;
    mysql_query($sql);
    echo "deleted ".mysql_affected_rows(). " records";
  }
?>

like this?



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




YAHOO! GROUPS LINKS




Reply via email to