Ryan,
you need to make all of those calls *before* ANY output has been sent by
your script, otherwise you can't send a header any more. so the TOP of a
script might look like
<?php
session_start();
$signor = $monsieur + $madame;
session_register("signor");
// the rest of your code goes here
?>
<html>
<?php
// more PHP
?>
if you get what I mean. you can actually do a lot of coding before you start
the session if you want, provided you haven't done any echo() print() or
anything that sends information as output.
HTH
beau
// -----Original Message-----
// From: Ryan Snow [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 28 February 2002 9:06 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] why won't session_start() work?
//
//
//
// when I do:
// session_start();
// session_register('signor');
// session_register('username');
//
//
// I get:
//
// Warning: Cannot send session cookie - headers already sent
// by (output
// started at /var/www/html/index.php:3) in
// /var/www/html/index.php on line 14
//
// Warning: Cannot send session cache limiter - headers already
// sent (output
// started at /var/www/html/index.php:3) in
// /var/www/html/index.php on line 14
//
// Anybody know why?
//
// Thanks.
//
// Ry
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
//
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php