<?php
$user_id=$_GET['user_id'];
if(isset($_GET['submit']))
{
if (mysql_connect("localhost","root",""))
{
//echo "connected";
mysql_select_db("php_classes");
$confirm=$_GET['confirm'];
if ($confirm==1)
{
$query="delete from profile where user_id=$user_id limit 1";
//echo $query;
$result=mysql_query($query);
if (mysql_affected_rows()==1)
{
echo "User of ID $user_id has been deleted ";
}
else
{
echo "User of ID $user_id has NOT been deleted";
}
}
else
{
echo "The action was not done";
}
}
else
{
echo "Could not connect to database";
}
}
?>
<form method="get" action="delete_user.php">
Deleting user <?php echo $user_id; ?>
<input type="hidden" name="user_id" value="<?php echo $user_id; ?>" /><br/>
<input type="radio" name="confirm" value="0" checked="checked"/>No <input type="radio" name="confirm" value="1"/>Yes<br/>
<input type="submit" name="submit" value="Do Action"/>
</form>
delete user from the database, delete with the confirm from the database, delete and confirm in the same page
Subscribe to:
Post Comments (Atom)
-
Why do niggers wear wide brimmed hats? So birds won't shit on their lips. How do you stop black kids from jumping on your bed? Put Velcr...
-
php, tutorial, sql, video, css, user, login, cookies, lifeg0eson666, marcus, recck, youtube, online, science, A PHP Tutorial creating a User...
-
Building a CMS with PHP and MYSQL Pat 2 video, php tutorials video, php and mysql to make cms video
No comments:
Post a Comment