Jump to content

Search the Community

Showing results for tags 'headers already sent'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. jimfog

    session problem

    take a look at the code below: ?><!DOCTYPE html><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="css/admingeneral.css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" ></script> <script type="text/javascript" src="js/js-code.js"></script> </head> <?phptry{ if(isset($_COOKIE['cookiename'])) { $cookievalue=$_COOKIE['cookiename']; redirect($cookievalue); } if(isset($_POST['submit'])&&(!empty($_POST['remember']))) { $username = $_POST['username']; $passwd = $_POST['password']; if ((login($username, $passwd))) { setcookie_pers($username); header("Location: adminmember.php"); } } require 'output_functions_admin.php'; This code above, normally, when run by the browser, it should output the "headers already sent" error and that is becausethe head section is before the setting of the cookie(the setcookie_pers functions sets a cookie). The problem is that sometimes I do not get an error, as I should-other times I get it.The behavior is unstable and I do not understand why. I wonder if there is something in browser behavior I miss here.
×
×
  • Create New...