Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/cmcnoida/public_html/mis/ruchi_admin/bd_panel/index.php:2) in /home/cmcnoida/public_html/mis/ruchi_admin/bd_panel/index.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/cmcnoida/public_html/mis/ruchi_admin/bd_panel/index.php:2) in /home/cmcnoida/public_html/mis/ruchi_admin/bd_panel/index.php on line 3
This is my code:
<?php
session_start();
include ('connect.php');
// Database included
//$date12=date("l F d, Y");
//echo $d=split($date12,0,10);
//$_SESSION['msg']="";
//Value submited that given by user at the click on button
if(isset($_POST['Submit'])=='Submit')
{
$user_email=$_POST['User_Email'];
$md5pass=md5($_POST['Password']);
$referer = $_SERVER['HTTP_REFERER'];
// Insert value in the database by executing the INSERT query
$sql = "SELECT * FROM login WHERE
User_Email_Id = '$user_email' AND
Password = '$md5pass' AND User_Activation_Status='1'";
$result = mysql_query($sql);
$num=mysql_num_rows($result);
if($num!=0)
{
// Session has been started
session_start();
list($userid,$user_email)=mysql_fetch_row($result);
//Put the useremail in the variable for continuing the session in further pages
$a=$_POST['User_Email'];
$_SESSION['user']=$a;
header('Location: bd_report1.php');
exit();
}
else
{
header("Location: index.php?msg=Invalid Login or please firstly you have to verification on email.");
exit();
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IN ADMIN PANEL | Powered by CMC Noida</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript">
ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</script>
<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.ask').jConfirmAction();
});
</script>
<script language="javascript" type="text/javascript" src="niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" />
</head>
<body>
<div id="main_container">
<div class="header_login">
<div class="logo"><a href="#"><img src="images/header.png" alt="" title="" border="0" /></a></div>
</div>
<div class="login_form">
<h3>BD Panel Login</h3>
<form name="form1" method="post" action="" id="form1" class="niceform">
<fieldset>
<dl>
<dt><label for="email">Email :</label></dt>
<dd><input name="User_Email" type="text" id="User_Email"></dd>
</dl>
<dl>
<dt><label for="password">Password:</label></dt>
<dd><input name="Password" type="password" id="Password" ></dd>
</dl>
<dl>
<dt><label></label></dt>
<dd>
<input type="checkbox" name="interests[]" id="" value="" /><label class="check_label">Remember me</label>
</dd>
</dl>
<dl class="submit">
<input type="Submit" name="Submit" value="Submit" id="Submit" >
</dl>
</fieldset>
</form>
</div>
<div class="footer_login">
</div>
</body>
</html>