I have a problem with Cannot modify header information in wordpress on Warning: Cannot modify header information - headers already sent by (output started at /home/sixtydev/public_html/voxxydev/wp-content/themes/voxxy/header.php:15) in /home/sixtydev/public_html/voxxydev/wp-includes/pluggable.php on line 865
my redirection code are :
if(isset($_GET['qry']) && !empty($_GET['qry'])){
$swl = mysql_query("update wp_share_idea set image".$_GET['qry']."='' where userId='".$delId."'");
wp_redirect("http://60degreedeveloper.info/voxxydev/user-profile/?msg='".$delId."'");
exit;
}
my header.php code:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Voxxy
* @since Voxxy 1.0
*/
?><html>
<head>
<title>Voxxy</title>
<link rel="profile" href="http://gmpg.org/xfn/11"/>
line no: 15:: <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url');?>"/>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>
and plugable.php code:
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = apply_filters('wp_redirect', $location, $status);
$status = apply_filters('wp_redirect_status', $status, $location);
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;
$location = wp_sanitize_redirect($location);
if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
line no:865:- header("Location: $location", true, $status);
}
I am get confused that where is the problem occured. Thanks in advance