Location: PHPKode > projects > NetLink > netlink_os/delete_account.php
<span id='error'>ATTENTION!</span>
<br/><br/>
<?php
include("db.php");
$user=$_SESSION['login'];

$dbh=mysql_connect ($host,$account,$acc_pw) or die (mysql_error());
mysql_select_db ($table); 

$sql="SELECT * FROM Accounts WHERE Username='$act'";
 $rs=mysql_query($sql,$dbh);
 $row=mysql_fetch_array($rs);
 $f_name=$row['FirstName'];
 $l_name=$row['LastName'];
 #Username is already defined in $ACT
 #$username=$row['Username'];
mysql_close($dbh);

echo "<form method='post' action='main.php?id=del_act&act=$act'>\n";
echo "Are you sure that you want to delete <b>";
echo ucfirst($f_name)." ".ucfirst($l_name)."'s</b> account, <i>";
echo ucfirst($act)."</i>?\n";
echo "<br/><br/>\n";
echo "This will delete $act's account on the server, records in the database,";
echo "and all of their files on the web server.\n";
echo "<br/><br/>\n";
echo "<table summary='del' border='0'>\n";
echo "<tr>\n<td>\n<input type='submit' name='yes_del' value=\"Yes, Delete $act's account\" style='font-weight:bold;'/>\n";
echo "</td>\n<td width='20px'/>\n<td>";
echo "<input type='button' onclick='location.href=\'main.php?id=welcome\' value=\"No, keep $act's account\"/>\n";
echo "</td>\n</tr>\n</table>";
echo "</form>";
?>
Return current item: NetLink