i added
if($act==del){
mysql_query("DROP TABLE survey") or die(mysql_error());
}
this should execute only if i make the url like del.php?act=del else only the DELETE FROM survey WHERE id = '$id' should work. tell me if its the right way
<?php
$id =$_REQUEST['id'];
$user = $login->username;
if($user =='administrator'){
// sending query
mysql_query("DELETE FROM survey WHERE id = '$id'")
or die(mysql_error());
header("Location: status.php");
}else{
header("Location: logout.php");
}
if($act==del){
mysql_query("DROP TABLE survey") or die(mysql_error());
}
?>












