Still not working.. it goes to user.php?view=13&act=del and all of that but nothing happens..
I also put die() inside the if statement and nothing happened so
isset($submit) && (isset($act) && $act == "del")
is comming up false.. =(
<?php
include("header.inc");
if(!$_GET['view'])
{
header("location:index.php");
}
else
{
$query = "SELECT * FROM profiles where ID = ". $_GET['view'];
$result = mysql_query($query, @mysql_connect(DB_SERVER, DB_USER, DB_PASS)) or die(mysql_error());
for ($i = 0; $i < mysql_num_rows($result); $i = $i + 1)
{
$ID = mysql_result($result, $i, "ID");
$name = mysql_result($result, $i, "name");
$image_news = mysql_result($result, $i, "image");
$body = mysql_result($result, $i, "body");
$body = nl2br($body);
$date = mysql_result($result, $i, "Date");
$show_date = date("M/d/Y", $date);
$extra = mysql_result($result, $i, "extra");
$iwidth = mysql_result($result, $i, "iwidth");
$iheight = mysql_result($result, $i, "iheight");
$ewidth = mysql_result($result, $i, "ewidth");
$eheight = mysql_result($result, $i, "eheight");
?>
<link href="style.css" rel="stylesheet" type="text/css">
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><div align="center" class="name"><?php echo($name); ?> </div></td>
</tr>
<tr>
<td align="left" valign="top">
<div align="left" class="body">
<p>
<?php
?>
<img src="<?php echo($image_news); ?>" width="<?php echo($ewidth); ?>" height="<?php echo($eheight); ?>" align="left" /><?php echo($body); ?></p>
</div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center"><img src="<?php echo($extra); ?>" width="<?php echo($iwidth); ?>" height="<?php echo($iheight); ?>" align="center" /></div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">
<?php
if($session->isAdmin()){
$submit = $_GET['Submit'];
$act = $_GET['act'];
if(isset($submit) && (isset($act) && $act == "del")){
$query = "DELETE FROM profiles WHERE ID = ".$ID;
$result = mysql_query($query, @mysql_connect(DB_SERVER, DB_USER, DB_PASS)) or die(mysql_error());
}
?>
<br />
<form id="for1" name="form" method="post" action="<?php echo("user.php?view=$ID&act=del"); ?>">
<input type="submit" name="Submit" value="Submit" />
</form>
<?php
}
?>
</div></td>
</tr>
</table>
<?php
}
}
include("footer.inc");
?>