hi i have just picked up a script of the net for my site and when i uploaded in onto my site i get the following message:
Warning: Cannot modify header information - headers already sent by (output started at /home/matureco/public_html/new/php/connection.php:4) in /home/matureco/public_html/new/php/session.php on line 19
ive tried different things to solve it after googleing but nothing is changing can anyone see whats causing it here code for that page
<?php
session_start();
include("connection.php");
if(isset($_POST['submit']))
{
$user=$_POST['user'];
$pass=$_POST['pass'];
$sql="SELECT * from emp where user='".$user."' and pass='".$pass."'";
$rs=mysqli_query($con, $sql);
if(mysqli_num_rows($rs)>0)
{
$rsdata=mysqli_fetch_array($rs);
@extract($rsdata);
$_SESSION['session_id']=$id;
$_SESSION['session_user']=$user;
//echo ('hello');
header("location: user_profile_new.php");
}
else{
echo "user or pass not matching please try again";
}
}
?>