0
PHP: Restrict access to a section of code
New Here
,
/t5/dreamweaver-discussions/php-restrict-access-to-a-section-of-code/td-p/127604
Jun 09, 2006
Jun 09, 2006
Copy link to clipboard
Copied
hi guys,
I have implemented the login/user auth sections of my webby without any problems. Ive used the built in server behaviours in DW8. So i have a session variable called MM_username.
now instead of restricting access to a whole page, i just need to restrict access to certain sections inside a page. For example i have a user admin panel that i only want to show if they are logged in. and i only want the logout button to show if they are logged in etc.
im not great at hand coding php yet , so any help would be greatly appreciated.
thanks,
ted.
I have implemented the login/user auth sections of my webby without any problems. Ive used the built in server behaviours in DW8. So i have a session variable called MM_username.
now instead of restricting access to a whole page, i just need to restrict access to certain sections inside a page. For example i have a user admin panel that i only want to show if they are logged in. and i only want the logout button to show if they are logged in etc.
im not great at hand coding php yet , so any help would be greatly appreciated.
thanks,
ted.
TOPICS
Extensions
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/php-restrict-access-to-a-section-of-code/m-p/127605#M176254
Jun 09, 2006
Jun 09, 2006
Copy link to clipboard
Copied
On 09 Jun 2006 in macromedia.exchange.extensions.dreamweaver,
tedrodgers wrote:
> I have implemented the login/user auth sections of my webby without
> any problems. Ive used the built in server behaviours in DW8. So i
> have a session variable called MM_username.
>
> now instead of restricting access to a whole page, i just need to
> restrict access to certain sections inside a page. For example i
> have a user admin panel that i only want to show if they are logged
> in. and i only want the logout button to show if they are logged in
> etc.
<?php if($_SESSION['MM_username']) { ?>
<!-- HTML code you want displayed goes here -->
<form name="logoutform" method="POST" action="logout.php">
<input type="submit" name="Submit" value="Log Out">
</form>
<?php } ?>
http://www.php.net/manual/en/ref.session.php
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
tedrodgers wrote:
> I have implemented the login/user auth sections of my webby without
> any problems. Ive used the built in server behaviours in DW8. So i
> have a session variable called MM_username.
>
> now instead of restricting access to a whole page, i just need to
> restrict access to certain sections inside a page. For example i
> have a user admin panel that i only want to show if they are logged
> in. and i only want the logout button to show if they are logged in
> etc.
<?php if($_SESSION['MM_username']) { ?>
<!-- HTML code you want displayed goes here -->
<form name="logoutform" method="POST" action="logout.php">
<input type="submit" name="Submit" value="Log Out">
</form>
<?php } ?>
http://www.php.net/manual/en/ref.session.php
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/php-restrict-access-to-a-section-of-code/m-p/127606#M176255
Jun 09, 2006
Jun 09, 2006
Copy link to clipboard
Copied
On 09 Jun 2006 in macromedia.exchange.extensions.dreamweaver,
tedrodgers
wrote:
> hi guys,
By the way: you'd be much better off in the macromedia.dreamweaver or
macromedia.dreamweaver.appdev groups; this group is fairly low volume.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
wrote:
> hi guys,
By the way: you'd be much better off in the macromedia.dreamweaver or
macromedia.dreamweaver.appdev groups; this group is fairly low volume.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
tedrodgers
AUTHOR
New Here
,
LATEST
/t5/dreamweaver-discussions/php-restrict-access-to-a-section-of-code/m-p/127607#M176256
Jun 09, 2006
Jun 09, 2006
Copy link to clipboard
Copied
oops i meant to put it in appdev 🙂 thnx
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

