hello
i have this code in php
> <form name ="deleteForm"
> action="CRUD/deleteAct.php"
> method="POST"><input type="text"
> value="'.$row['id'].'"/><input
> type="submit" value="DELETE" /></form>
and when it post to deleteAct.php
we have this code to get the id value
connection..
mysql_select_db('bena');
echo "delete info";
$id = $_GET['id'];
echo "$id";
$delete = "DELETE FROM activites WHERE id = $id";
$delquy = mysql_query($delete,$connection);
if( $delquy )
echo " information was deleted!";
i was exchanged $_POST with $_GET in the deletAct.php file but didn’t solve!
Your initial form uses the POST method, hence if you need the value of id, look in the $_POST array. Generally, it might be nice to sanitise the value anyway. It needs a name attribute though: