I write to PHP. In general, my database data is placed in an array and then the cycle in the contamination is displayed. It is necessary to make a link to remove a specific string. Only here I do not even have a concept, how the links will look like how to make a program, etc. Help please
Answer 1, Authority 100%
session_start ();
Require "db.inc.php";
Require "lib.inc.php";
$ id = $ _get [id "];
PageDel ($ ID);
HEADER ("Location: index.php");
FUNCTION PAGEDEL ($ ID) {// Page Removal Function
$ sql = "delete from pages where id = $ id";
MySQL_Query ($ SQL) or DIE (mysql_error ());
}
But this will look like a link to the removal itself
& lt; a href = "delete-form-page.php? id = & lt;? = $ items [" id " ]? & gt; "& gt; Remove & lt; / a & gt;`
Answer 2
delete from `tablename` Where` id` = '{id}';