Posted by Dynamo on 05/20/06 19:03
Many thanks. Apart from a couple of false starts everything is now OK. First
time I tried your code I simply copied and pasted it and ended up with an
unknown function error. Although you correctly call it session_start() to begin
with, in the actual sample code you called it start_session(). Second time I
tried it I got a couple of warnings that headers had already been sent and that
the session could not be started. That was because I hadn't called the function
at the ABSOLUTE beginning of the page. I had
<?php
include("connect.php");
session_start();
?>
But when I changed it to
<?php
session_start();
include("connect.php");
?>
Everything was honky dory. I guess a little bit always needs to be left to the
programmer to sort out eh? :-)
Many thanks to all those that helped with this posting
Dynamo
In article <F9udnZilfvxmhPLZnZ2dnUVZ_uWdnZ2d@comcast.com>, Jerry Stuckle says...
>
>The way I prefer is to store it in the session. Just call session_start() at
>the beginning of each page where you need sessions (before ANY output -
>including whitespace - is generated) and store it in the session, i.s.
>
> <?php
> start_session();
> (perhaps other stuff here, i.e. validation code)
> $_SESSION['delete'] = $_POST['delete'];
> ?>
>
>Then the next time through you can get it from $_SESSION['delete'].
>
[Back to original message]
|