Jump to content

Recommended Posts

Posted

I've a problem with the function "session_register();". When I'm using this function. I'm getting the following message:

Warning: Cannot

modify header

information - headers

already sent by (output

started at /home/sb/

public_html/global/

admin_header2.php:4) in

/home/sb/

public_html/admin/

login.php on line 75

Here is the url of the file "admin_header2.php": www.sbook.ga/global/admin_header2.php

and the file "login.php" is: www.sbook.ga/admin/login.php

Please help me to resolve the problem.

Posted

This means that the output has already been started. Once the output is started you cant send headers. You need to check the 4th line of admin_header2.php.

  • Like 1
Posted

Sir, here is my full "admin_header2.php" file script.

<!DOCTYPE html>

<html lang="en">

<head>

<?php

require "/home/sb/config/directories.php";

require $cnf."refids.php";

require $cnf."admins.php";

?>

<link rel="stylesheet" type="text/css" href="/global/styles/admin/global.css">

 

<script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.min.js"></script>

<script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.js"></script>

 

<?php

require "/home/sb/public_html/global/styles/sbook2013.php";

?>

 

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<title></title>

</head>

 

<body class="nontouch">

<div class="logo">

<table cellspacing="0">

<td>

<a href="index.php?refid=2<?php if(isset($sess_id) && !empty($sess_id)) { echo "&sess_id=$sess_id"; }?>"><?php require $global."logos/logo.php";?></a>

</td>

<td align="right" valign="bottom" style="width:25%;height:5%"><a class="btn btnS" align="right" href="/members/apanel/register">Sign Up</a></td>

</table>

</div>

Now tell me where is the problem and how to fix this!

Posted

Those HTML tags at the very top should be after the php block. It needs to be like this:

 

<?php

require "/home/sb/config/directories.php";

require $cnf."refids.php";

require $cnf."admins.php";

require "/home/sb/public_html/global/styles/sbook2013.php";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<link rel="stylesheet" type="text/css" href="/global/styles/admin/global.css">

 

<script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.min.js"></script>

<script src="/includes/libraries/jquery/1.11.1/jquery-1.11.1.js"></script>

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<title></title>

</head>

 

<body class="nontouch">

<div class="logo">

<table cellspacing="0">

<td>

<a href="index.php?refid=2<?php if(isset($sess_id) && !empty($sess_id)) { echo "&sess_id=$sess_id"; }?>"><?php require $global."logos/logo.php";?></a>

</td>

<td align="right" valign="bottom" style="width:25%;height:5%"><a class="btn btnS" align="right" href="/members/apanel/register">Sign Up</a></td>

</table>

</div>

 

  • Like 1
Posted

Ok, I've fixed the problem. Now I am seeing that, my "login.php" file is not working. The form inside the "login.php" file is not sending any data. Can you tell me why this happens and how to redirect logged users to another page with the "sess_id=sess_id"? Please check the "login.php" file at: http://www.sbook.ga/admin/login.php

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...