Location: PHPKode > projects > NetLink > netlink_os/delete.php
<h3>Delete a File</h3>
<div style='font-size:10pt;'>
<?php
extract($_GET);
extract($_SESSION);
echo "<span id='error'>ATTENTION!</span>";

#Database connectivity
/*
* Connect to the database to retrieve the user's first name for
* a more "customized" output
*/
include("db.php");

$dbh=mysql_connect ($host,$user,$pass) or die ('MySQL Error: ' . mysql_error());
mysql_select_db ($table); 

$sql="SELECT * FROM Accounts WHERE Username='$login';";
$rs=mysql_query($sql,$dbh);
$login=strtolower($login);

$row=mysql_fetch_array($rs);
$f_name=ucfirst($row['FirstName']);
mysql_close();

echo "\n\n<br/><br/>Attention $f_name!<br/><br/>";
echo "Are you <i><b>sure</b></i> you want to delete $file?";
echo "\n<br/>This action <b>cannot</b> be undone! Once you delete this file, it will be gone from";
echo "\n our records and databases forever!";
echo "\n<br/>\n<br/>";
echo "\n<form method='post' action='?id=delete2&file=$file'>";
echo "\n<input type='submit' name='submit' value='Yes, Delete This File!'/>";
echo "\n&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;\n";
echo "<input type='button' onclick='location.href=\"?id=cms\"' name='cancel' value='No, Keep This File'/>";
echo "</form>";
?>
</div>
Return current item: NetLink