sabret00the
07-08-2004, 11:30 AM
if ($_REQUEST['action'] == "delete")
{
if ($bbuserinfo[usergroupid] == 6)
{
eval("\$delete_form = \"".fetch_template("confessions_deleteform")."\";");
if ($POST['confirm'] == "delete")
{
if ($bbuserinfo[usergroupid]==6 && confessionid==$confessionid)
{
$DB_site->query("
DELETE FROM confessions
WHERE confessionid = $confessionid
");
$url = "../confessions/";
eval(print_standard_redirect("confess_deletion_success"));
}
else
{
//header("Location: index.php?confessionid=$confessionid");;
eval(print_standard_error('confessions_error'));
}
}
}
}
i've got this code, this form
<form method="post" name="confess_delete" action="index.php?confessionid=$confessionid&action=report&confirm=delete" source="index.php?confessionid=$confessionid&action=report">
<input type="hidden" name="confessionid" value="$confessionid">
<input type="hidden" name="userid" value="$bbuserinfo[userid]">
<table class="tborder" cellpadding="5" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat"> are you sure you want to delete this confession</td>
</tr>
<tr>
<td valign="top" class="alt1" align="center">
<textarea name="reason" cols="50" rows="5">
please confirm deletion of confession number $confessionid
this should be the same as the number above
</textarea>
</td>
</tr>
<tr>
<td class="thead" align="center">
<input type="submit" name="confession_delete" value="Delete Confession" accesskey="s">
<input type="button" value="Cancel" onClick="history.back()">
</td>
</tr>
</table>
</form>
sends it there, however it's not working, the url of said form /confessions/index.php?confessionid=170&action=delete
but i can't see why this wouldn't work, help :nervous: :o
{
if ($bbuserinfo[usergroupid] == 6)
{
eval("\$delete_form = \"".fetch_template("confessions_deleteform")."\";");
if ($POST['confirm'] == "delete")
{
if ($bbuserinfo[usergroupid]==6 && confessionid==$confessionid)
{
$DB_site->query("
DELETE FROM confessions
WHERE confessionid = $confessionid
");
$url = "../confessions/";
eval(print_standard_redirect("confess_deletion_success"));
}
else
{
//header("Location: index.php?confessionid=$confessionid");;
eval(print_standard_error('confessions_error'));
}
}
}
}
i've got this code, this form
<form method="post" name="confess_delete" action="index.php?confessionid=$confessionid&action=report&confirm=delete" source="index.php?confessionid=$confessionid&action=report">
<input type="hidden" name="confessionid" value="$confessionid">
<input type="hidden" name="userid" value="$bbuserinfo[userid]">
<table class="tborder" cellpadding="5" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat"> are you sure you want to delete this confession</td>
</tr>
<tr>
<td valign="top" class="alt1" align="center">
<textarea name="reason" cols="50" rows="5">
please confirm deletion of confession number $confessionid
this should be the same as the number above
</textarea>
</td>
</tr>
<tr>
<td class="thead" align="center">
<input type="submit" name="confession_delete" value="Delete Confession" accesskey="s">
<input type="button" value="Cancel" onClick="history.back()">
</td>
</tr>
</table>
</form>
sends it there, however it's not working, the url of said form /confessions/index.php?confessionid=170&action=delete
but i can't see why this wouldn't work, help :nervous: :o