I am having trouble getting a form to post a variable and then have my PDO statement execute a delete. I do know that the variable $resulting[WID] does have the correct value stored in it in my form. The problem is lies in passing the variable from this form to the code below to execute the delete statement. The error am getting is: Invalid parameter number: parameter was not defined
//here is the php/PDO code:
if(isset($_POST['remove'])){
$the_WID = $_POST['WID'];
echo "here is the WID" . $the_WID;
$dlt = "DELETE FROM writing WHERE writing.WID = :writing.WID";
$stmtdlt = $dbh->prepare($dlt);
$stmtdlt->bindParam(':writing.WID', $the_WID, PDO::PARAM_INT);
$stmtdlt->execute();
}
//here is the form
<form action="" method="post">
<button type="submit">Delete</button>
<input TYPE="hidden" name="remove" VALUE="<?php $resulting[WID]; ?>">
</form>