Re: PHP for Dummies (Me being the dummy)
- From: JDS <jeffrey@xxxxxxxxxxxxxxx>
- Date: Fri, 05 Aug 2005 13:03:36 -0400
On Fri, 05 Aug 2005 09:01:08 -0700, rik wrote:
> Ken, you are a beautiful, beautiful man.
I don't know about that...
>
> I, am a stupid, stupid man.
Not so sure about that, either....
>
> Regards,
>
> Rick
I have one tip regarding sessions and PHP > 4.2 (maybe > 4.1 even)
Don't use "session_register()"! ONLY use $_SESSION to get data in and out
of sessions. session_register() is an evil function that needs black
voodoo magic incantations and the wind blowing in the right direction to
work (consistently, at least).
$_SESSION *always* works (well, as close to "always" as you can get when
talking about computer programming). And is *MUCH* more straightforward
than session_register().
Just a tip. Of course, you *do* have to remember to do session_start() on
each PHP page that is going to be "in session".
I also recommend putting all of your configuration information, including
the "session_start()" command, in an external file and calling that file
using include() or require() at the start of each page within the same PHP
application.
later...
--
JDS | jeffrey@xxxxxxxxxxxxxxx
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
.
- References:
- PHP for Dummies (Me being the dummy)
- From: rik
- Re: PHP for Dummies (Me being the dummy)
- From: Ken Robinson
- Re: PHP for Dummies (Me being the dummy)
- From: rik
- PHP for Dummies (Me being the dummy)
- Prev by Date: online reference to mysql_errno() codes?
- Next by Date: Submit Form
- Previous by thread: Re: PHP for Dummies (Me being the dummy)
- Next by thread: online reference to mysql_errno() codes?
- Index(es):
Relevant Pages
|