Hi all
I have a site with regesterd members but I don't have a button for them to deleite there account,
need some code dudes.
hes what I got just not working ..........................
code try 1
if(isset($_POST['delete']))
{
$getuserinfo="SELECT * from b_users where username='$SESSION[user]";
$getuserinfo="SELECT * from wp_users where user_login='$SESSION[user]'";
$getuserinfo="SELECT * from usersgnet where name='$SESSION[user]'";
$delname="DELETE from wp_users where user_login='$SESSION[user]'";
mysql_query($delname) or die(mysql_error());
$delname="DELETE from usersgnet where name='$SESSION[user]'";
mysql_query($delname) or die(mysql_error());
$deluser="DELETE from b_users where username='$SESSION[user]'";
mysql_query($deluser) or die("Could not delete user");
print "User deleted";
Code try 2
$emp_id = $_SESSION['user'];
$sql = "DELETE * form usersgnet".
"WHERE emp_id = $name" ;
mysql_select_db('gnetuk_net');
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not delete data: ' . mysql_error());
}
echo "Deleted data successfully\n";
mysql_close($conn);
peace
I have a site with regesterd members but I don't have a button for them to deleite there account,
need some code dudes.
hes what I got just not working ..........................
code try 1
if(isset($_POST['delete']))
{
$getuserinfo="SELECT * from b_users where username='$SESSION[user]";
$getuserinfo="SELECT * from wp_users where user_login='$SESSION[user]'";
$getuserinfo="SELECT * from usersgnet where name='$SESSION[user]'";
$delname="DELETE from wp_users where user_login='$SESSION[user]'";
mysql_query($delname) or die(mysql_error());
$delname="DELETE from usersgnet where name='$SESSION[user]'";
mysql_query($delname) or die(mysql_error());
$deluser="DELETE from b_users where username='$SESSION[user]'";
mysql_query($deluser) or die("Could not delete user");
print "User deleted";
Code try 2
$emp_id = $_SESSION['user'];
$sql = "DELETE * form usersgnet".
"WHERE emp_id = $name" ;
mysql_select_db('gnetuk_net');
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not delete data: ' . mysql_error());
}
echo "Deleted data successfully\n";
mysql_close($conn);
peace
Comment