🔒 Closed Help needed

Status
Not open for further replies.

Ajpgwapo

Eternal Poster
Boss pa help po...

Encountered this error nung pinublish ko na ang site... Sana may maka tulong..

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home2/darkmoon/public_html/users.php:4) in /home2/darkmoon/public_html/cfg/db.php on line 7
 
"Headers already sent" means that your PHP script already sent the HTTP headers, and as such it can't make modifications to them now.

Check that you don't send ANY content before calling session_start. Better yet, just make session_start the first thing you do in your PHP file (so put it at the absolute beginning, before all HTML etc).

-StackOverflow
 
one question, where do i look, on my profile.php or on my db.php?

BTW, Here is my code on my profile.php


<html>

<?php
include('components/header.php');
include('components/bodytop.php');
?>

<div class="wrapper">
<?php
include("components/nav.php");
include("components/sidebar.php");
//$current_uid= $_SESSION['user']['id'];

if(!(isset($_SESSION['user']))){
header ("Location: login.php");
}

$get_id=0;
if(isset($_GET['user'])){
$get_id = $db -> escape($_GET['user']);
if($db -> select("SELECT `user_id` FROM `users` WHERE `user_id`=$get_id") == ""){
header("location: profile.php");
 
Status
Not open for further replies.

About this Thread

  • 6
    Replies
  • 564
    Views
  • 3
    Participants
Last reply from:
Jmrie_

Trending Topics

Online now

Members online
626
Guests online
3,591
Total visitors
4,217

Forum statistics

Threads
2,306,462
Posts
29,171,916
Members
1,194,841
Latest member
doolish1
Back
Top