• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP quickie

SarcasticDwarf

Diamond Member
Here are the first 16 lines of code (meta stuff omitted)

The following works fine:
<html>
<head>
<META name="keywords" content="">
<meta name="">
<meta name="">
<TITLE>Internet Book List :: $pagetitle</TITLE>
</head>
<body>
<link type="text/css" rel="stylesheet" href="site.css" />
<?php
echo "help";
?>
<div id="top"></div>
<div id="content">
<div id="navigation">
<form id="search" method="post" action="#">


This does too
I add this as the first body element:
$link = mysql_connect("localhost", "user", "pass") or die("Error: Could not connect to database.");
mysql_select_db("database") or die("Error: Could not select database.");

This does not

<html>
<head>
<META name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<TITLE>Internet Book List :: $pagetitle</TITLE>
</head>
<body>
<link type="text/css" rel="stylesheet" href="site.css" />

<?php
$userID = $loggedin = $master = $admin = 0;
include 'logdin.php';
?>

<div id="top"></div>
<div id="content">
<div id="navigation">
<form id="search" method="post" action="#">

Lines 21 and 32:
</ul>
<div class="navheader">

Errors - Italicized above
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/development/iblist/dev/index.php:4) in /home/user/public_html/development/iblist/dev/logdin.php on line 8

I get that for lines 8,9,11,12,13,31,32
 
If you want to set cookies or do header stuff, you must do it before your <head> tag...I can't really see what you're doing if that isn't it w/ this code
 
Originally posted by: onelin0
If you want to set cookies or do header stuff, you must do it before your <head> tag...I can't really see what you're doing if that isn't it w/ this code

So it would be
<html>
<?php
whatever
?>
<head>
</head>
<body>
</body>
</html>


I put those lines in that spot and I still get the same.
 
Back
Top