Hi,
following code run our server but this is not run client server:-
index code is: PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
when we login through this page its go next page and show this type errors
Warning: Cannot send session cache limiter - headers already sent (output started at c:\apache\htdoc s\medscout\www\ connection.php: 1) in c:\apache\htdoc s\medscout\www\ my-medscout.php on line 4
but if we used @session_start( ); in the place of session_start() ; in the above page, above errors reduce, and problem those time occur when we register another page name is employer page and when we logout.then show following errors.
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdoc s\medscout\www\ connection.php: 1) in c:\apache\htdoc s\medscout\www\ logout.php on line 7
logout code is :- PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
Tanks
Record
Anis Ahmad
following code run our server but this is not run client server:-
index code is: PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
Code:
<?php
ob_start();
session_start();
include_once("connection.php");
if($_POST["login_x"]!="") ## Submit a login button
{
$uname=$_REQUEST['uname'];
$password=$_REQUEST['password'];
$uname=trim($uname);
$password=trim($password);
$sql=mysql_query("select * from tb_login where fld_uname='$uname' && fld_password='$password' && fld_status='Approved'");
$num=mysql_num_rows($sql);
$ress=mysql_fetch_row($sql);
$uidd=$ress[0];
if($num > 0)
{
$_SESSION['username']="$uname";
$_SESSION['uid']="$uidd";
header("location: my-medscout.php");
}
else
$msg="Invalid username / password ";
}
}
?>
when we login through this page its go next page and show this type errors
Warning: Cannot send session cache limiter - headers already sent (output started at c:\apache\htdoc s\medscout\www\ connection.php: 1) in c:\apache\htdoc s\medscout\www\ my-medscout.php on line 4
but if we used @session_start( ); in the place of session_start() ; in the above page, above errors reduce, and problem those time occur when we register another page name is employer page and when we logout.then show following errors.
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdoc s\medscout\www\ connection.php: 1) in c:\apache\htdoc s\medscout\www\ logout.php on line 7
logout code is :- PUT YOUR CODE BETWEEN code OR php TAGS!! It is absolutely unreadeable!
Code:
<?php
include_once("connection.php");
@session_start();
$_SESSION["username"]="";
$_SESSION["uid"]="";
session_destroy();
header("Location:index.php");
?>
Employer page coding is:-
<?php
include_once("connection.php");
ob_start();
@session_start();
if($_POST["login_x"]!="")
{
$emp_name=$_REQUEST['emp_name'];
$emp_pass=$_REQUEST['emp_pass'];
$emp_name=trim($emp_name);
$emp_pass=trim($emp_pass);
$sql1=mysql_query("select * from tb_emp where fld_ename='$emp_name' && fld_passs='$emp_pass' && fld_status='Approved'");
$num1=mysql_num_rows($sql1);
$ress1=mysql_fetch_row($sql1);
$uidd1=$ress1[0];
if($num1 > 0)
{
$_SESSION['empname']="$emp_name";
$_SESSION['eid']="$uidd1";
header("location: my-medscout-emp.php");
}
else
{
$msg1="Invalid user/password ";
}
}
?>
Tanks
Record
Anis Ahmad
Comment