🔒 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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
335
Guests online
2,748
Total visitors
3,083

Forum statistics

Threads
2,352,331
Posts
29,375,243
Members
1,084,571
Latest member
artz1344
Back
Top