> 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
- Visit your group "php-list" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
