This method works fine.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote
in message
news:egth4p$2jb$1@forums.macromedia.com...
> Thanks, David. I'll give that a try. I'm not sure why
it's making things
> hang, but when going to one of those pages, I get a
timeout error....
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "David Powers" <david@example.com> wrote in
message
> news:egtfr1$188$1@forums.macromedia.com...
>> Murray *ACE* wrote:
>>> Regarding my previous question - these lines
inserted by DW on pages
>>> that I want to restrict access on are causing
things to hang -
>>>
>>> if (!isset($_SESSION)) {
>>> session_start();
>>> }
>>>
>>> Do I need to have that on each such restricted
page?
>>
>> Yes, of course, if you want to use a $_SESSION
variable, you must
>> initiate a session.
>>
>> You don't need the conditional clause. That was
added to Dreamweaver 8 at
>> my suggestion because Dreamweaver server behaviors
that rely on sessions
>> all insert session_start(). If you have two on the
same page, it
>> generates a warning message.
>>
>> For a manual restrict access to page, this is all
you need:
>>
>> <?php
>> session_start();
>> if (!isset($_SESSION['name_of_session_variable'])) {
>> header('Location:
http://www.example.com/login.php');
>> exit;
>> }
>> ?>
>>
>> The Dreamweaver restrict access to page SB checks
other things such as
>> access level. It also adds a query string to the
redirect URL, so that
>> the visitor can redirected to the same page after
successfully logging in
>> (as long as that option is selected in the Log In
SB).
>>
>> --
>> David Powers
>> Adobe Community Expert
>> Author, "Foundation PHP for Dreamweaver 8" (friends
of ED)
>>
http://foundationphp.com/
>
>