Hi,
I am having a problem with my Button and Function. If anyone can show me what I am doing wrong, it will be greatly appreciated. (I ain't to clued up on functions!)
My image/button is as follows:
<input name=\"deleteuser\" type=\"submit\" value=\"delete\">
Once clicked, I call my delete function at the top of my page:
if (isset($_POST[deleteuser])) {
$success = DeleteUser($userid);
}
My DELETE function is:
function DeleteUser($userid) {
$sqlquery = "DELETE FROM tblusers WHERE userid= $userid";
$result = mysql_query($sqlquery, $_SESSION['S_REMOTE_DB']);
if ($result) {
$blnresult = true;
} else {
$blnresult = false;
}
return $blnresult;
}
Obviously, it is not working which is why I ask for some help.
Any advice on what is incorrect?
Thanks in advance.
K.