Jump to content

[SOLVED] Header not working..


jwwceo

Recommended Posts

Hello,

 

I have a page where the header has stopped working. It used to work fine. There is no output before the header tag. Is there maybe an apache setting that disallows header functions?

 

James

 

<?php

include 'library/config.php';
include 'library/opendb.php';
error_reporting(0);


$shirt_id = $_GET['shirt_id'];

if(isset($_POST['delete'])) {

$query = "DELETE from shirts WHERE shirt_id='$shirt_id'";
$result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query);

mysql_query("DELETE FROM shirtkeywords WHERE shirt_id = '$shirt_id'") or die (mysql_query());
mysql_query("DELETE FROM shirtcolors WHERE shirt_id = '$shirt_id'") or die (mysql_query());


header("Location: http://www.liquidcotton.com/admin");

}

Link to comment
Share on other sites

check to see if your code is being completely evaluated from top to bottom - try this:

 

<?php

include 'library/config.php';
include 'library/opendb.php';
error_reporting(0);


$shirt_id = $_GET['shirt_id'];

if(isset($_POST['delete'])) {

$query = "DELETE from shirts WHERE shirt_id='$shirt_id'";
$result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query);

mysql_query("DELETE FROM shirtkeywords WHERE shirt_id = '$shirt_id'") or die (mysql_query());
mysql_query("DELETE FROM shirtcolors WHERE shirt_id = '$shirt_id'") or die (mysql_query());

header("Location:refresh;url=http://www.liquidcotton.com/admin");
echo "Success - Delete Complete!\n";

}
?>

 

do you see "Success - Delete Complete!"?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.