i write a class for work with database. this class has many function like delete,login,insert,update and... and this class working fine and don't problem. i want write a code for delete a record this is my code:
///// Delete A record
elseif($_GET['act']=='del'){
require_once '../classes/user.class.php';
$us=new User();
$us->user_id=$_GET['id'];
?>
do you want delete this username?
<br>
<a href="user_management.php?action=delyes&id=<?phpecho$us->user_id;?>">yes</a>
<a href="user_management.php?action=delno">دخ</a>
<?php
if ($_GET['action']=="delyes"){
$us->Delete();
echo "complete";
}elseif ($_GET['action']=="delno"){
echo "you cansle it";
}
}
please help, and i remember function delete work correctly and my confirmation code has problem. thanks.