I am getting a warning Cannot modify header information- headers already sent by (output started...). What I have done is if the user submitted data, it will be inserted into the database and the page is redirected to the 'members.php'.
Here is my code...
include('connect.php');
if(isset($_POST['submit']))
{
    $name= $_POST['name'];
    $contact= $_POST['contact'];
    $college= $_POST['college'];
    $address= $_POST['address'];
    $insert_query= mysql_query("insert into members_details(member_name,contact_no,college,address) values('".$name."','".$contact."','".$college."','".$address."')");
    if($insert_query)
    {
       header("Location: members.php");
    }
}
//members.php code
include('connect.php');
$select_query= mysql_query("select * from members_details order by reg_no");
$rows= mysql_num_rows($select_query);
 
    