Cannot modify header information headers already sent
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1827314/cannot-modify-header-information-headers-already-sent-why-its-happening">Cannot modify header information - headers already sent, Why its happening</a><br>
  <a href="http://stackoverflow.com/questions/8028957/headers-already-sent-by-php">Headers already sent by PHP</a>  </p>
</blockquote>



<p>Warning: Cannot modify header information - headers already sent by (output started at /localhost/request/band_signup.php:117) in 
/localhost/request/band_signup.php on line</p>

<pre><code>&lt;body&gt;&lt;div class="block small center outlet"&gt;

&lt;div class="block_head"&gt;
                    &lt;div class="bheadl"&gt;&lt;/div&gt;
                    &lt;div class="bheadr"&gt;&lt;/div&gt;

                    &lt;h1 align=center&gt;Signup&lt;/h1&gt;
                    &lt;/div&gt;
&lt;form  enctype='multipart/form-data' action='band_signup.php' name='signup' method='post' onsubmit="return send();"&gt;&lt;div class='block_content'&gt;&lt;table&gt;
&lt;tr&gt;Username :&lt;/tr&gt;&lt;tr&gt;&lt;input type='text' name="user"  id="user" class='text' value=''&gt;&lt;/tr&gt;
&lt;tr&gt;Artist Name :&lt;/tr&gt;&lt;tr&gt;&lt;input type='text' name="band" id="band" class='text' value=''&gt;&lt;/tr&gt;
&lt;tr&gt;Facebook fan Page :&lt;/tr&gt;&lt;tr&gt;&lt;input type='text' name="face" class='text' value=''&gt;&lt;/tr&gt;
&lt;tr&gt;Email :&lt;/tr&gt;&lt;tr&gt;&lt;input type='text' name="email"  id="email" class='text' value=''&gt;&lt;/tr&gt;
&lt;tr&gt;Password :&lt;/tr&gt;&lt;tr&gt;&lt;input type='password' name="pass" id="pass" class='text' value=''&gt;&lt;/tr&gt;
&lt;tr&gt;Biography :&lt;/tr&gt;&lt;tr&gt;&lt;textarea cols='159' name=bio class='text' value=''&gt;&lt;/textarea&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;p class='fileupload'&gt;Picture :&lt;/tr&gt;&lt;tr&gt;
&lt;td&gt;
&lt;input  type='file' name='fileupload' id='fileupload' /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;input type="button" class="submit small"  value="?" onmouseover="document.getElementById('continue').style.display='block';document.getElementById('fade').style.display='block'" 
                        onmouseout="document.getElementById('continue').style.display='none';document.getElementById('fade').style.display='none'"/&gt;&lt;/td&gt;&lt;td align="right"&gt;&lt;input type="button" class="submit" name="terms" onclick = "document.getElementById('continue1').style.display='block';document.getElementById('fade').style.display='block'" value="View terms and conditions" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;input type="checkbox" name="check" id="check"  /&gt;&amp;nbsp;I Accept Terms &amp; Conditions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="submit" class="submit small" value="Submit"&gt;&lt;input type="reset" class="submit small" value=Reset&gt;&lt;/td&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;td&gt;&lt;input type="button"  class="submit small" onClick="myPopup()" value="Home"&gt;&lt;/input&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;p align=center&gt;&lt;font color='red' size=2&gt;&lt;?=$failed?&gt;&lt;/p&gt;

&lt;/table&gt;&lt;/div&gt;&lt;/form&gt;   &lt;div class="bendl"&gt;&lt;/div&gt;
                &lt;div class="bendr"&gt;&lt;/div&gt;

&lt;/div&gt;
&lt;div id="continue" class="white_content1"&gt;
&lt;p&gt;&lt;font color="#000000" size=4&gt;&lt;h2&gt;Live Request Help&lt;/h2&gt;&lt;br/&gt;
Upload your picture for your profile. You can&lt;br/&gt;
change it at any time later on. If you don’t have a&lt;br/&gt;
picture a default one will be provided for you.&lt;br/&gt;
The allowable file formats are Jpg,Tiff, and PNG.&lt;br/&gt;
The maximum image size you can upload is 3MB.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id="fade" class="black_overlay"&gt;
&lt;/div&gt;
&lt;div id="continue1" class="white_content1"&gt;
&lt;p&gt;&lt;font color="#000000" size=4&gt;&lt;h2&gt;Live Request Terms and
Conditions&lt;/h2&gt;&lt;br/&gt;
This software is provided as is without warranty.&lt;br/&gt;You are granted to use it freely. LRN assumes no&lt;br/&gt;responsibilities for system glitches. The User will&lt;br/&gt;not abuse the system nor misrepresent&lt;br/&gt;themselves.
&lt;/font&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;input type="button" class="submit" value="Close"  onclick="document.getElementById('continue1').style.display='none';document.getElementById('fade').style.display='none'"/&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id="fade" class="black_overlay"&gt;
&lt;/div&gt;
&lt;/body&gt;&lt;/html&gt;
&lt;?php
if( $_POST['band'])
{
$real=$_POST['realname'];
$band=$_POST['band'];
$face=$_POST['face'];
$bio=$_POST['bio'];
$bio=addslashes($bio);
$email=$_POST['email'];
$user=$_POST['user'];
$pass=$_POST['pass'];
$bio=addslashes($bio);
$pic=$_FILES['fileupload']['name'];
if($pic==null)
{$new_picname="http://localhost/request/photos/live%20request%20now%20-%20avatar.jpg";}
  else
{
$new_picname=date("YmdHis").".jpg";    
  $target_path="photos/".$new_picname;
}
move_uploaded_file($_FILES["fileupload"]["tmp_name"],$target_path);
$result1=mysql_query("select * from Artist where Login='$user' or Email='$email'");
$count=mysql_num_rows($result1);
if($count&gt;0)
{
header('Location:band_signup.php?failed=Signup failed UserName/Email already existed');
}
else
{
$query="insert into  Artist(ArtistName,FacebookUrl,Biography,Email,Login,Password,Picture)values('$band','$face','$bio','$email','$user','$pass','$new_picname')";
echo $query;
$result=mysql_query($query);
if($result)
{
$query="select * from  Artist where Email='$email' and Password='$pass'";
$result2=mysql_query($query);
$user=mysql_fetch_row($result2);
$_SESSION['user']=$email;
$_SESSION['artistid']=$user[0];
$_SESSION['artistname']=$user[1];
header('Location:listsonglist.php?email=$email');
//header("Location: http://localhost/request/index.php?success=Signup successfully please login");
}
else
{
header('Location:band_signup.php?failed=Signup failed. $error');
}
}
}
?&gt;
</code></pre>

<p>i creating a sign up form above shown but the values is entered to the mysql table
but the page not redirect to the login page</p>
