I am developing an mobile application using jquery mobile and PHP. I encounter a warning when i submit the form for checking the credentials.
Warning: Cannot modify header information - headers already sent by (output started at /home/u387779804/public_html/walcliff/index.php:6) in /home/u387779804/public_html/walcliff/index.php on line 48
The php code
<?php session_start();?>
    <?php 
     if(isset($_POST['sec']))
     {
     $s=$_POST['sec'];
     $user="u387779804_a";
     $password="arunvenu123";
     $server="mysql.1freehosting.com";
     $con=mysql_connect($server,$user,$password);
     mysql_select_db("u387779804_a",$con);
     $query=mysql_query("select * from details where secretnum='$s'");
     if (!$query) { // add this check.
        die('Invalid query: ' . mysql_error());
    }
     $info=mysql_fetch_array($query);
     if($_POST['sec'] == $info['secretnum'])
     {  
        $_SESSION['fid']=$info['fid'];
        $_SESSION['phone']=$info['phone'];
        $_SESSION['name']=$info['name'];
        $_SESSION['email']=$info['email'];
        $_SESSION['address']=$info['address'];
        $_SESSION['city']=$info['city']; 
      header('Location:list.php'); 
    }
     else
     {
        echo '<script> alert("Wrong User name password")</script>';
     }
    } 
   ?>
I have attached the screen shoot also.Any possible solutions for this problem is welcomed! Thanks in advance!

 
     
    