Common Error PHP

1. Cannot modify header information - headers already sent by ?

$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];

Replaced

print "<script language=\"JavaScript\">";
print "window.location = '$insertGoTo' ";
print "</script>";

OR

header(sprintf("Location: %s", $insertGoTo));
Replaced
header("Location: ".$insertGoTo);

 

 

 

 

 

 

 

 

 

 

 

@Copy right of Soon Lim 2006. All Right Reserved