Bowlslaw has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'm trying to figure out how I would use "modes" to control page functionality. For example, I have a page link:
<a href="/viewquestions.dhtml~useridtext~">View and answer questions</a>I must be able to change the functionality of the page, which would currently display a list of questions and answers. However, I also need it to be in "adminmode", in which the user/admin will be able to edit the questions/answers file himself. How would I do this with "modes"? So far, I have come up with:
<a href="/viewquestions.dhtml~useridtext~$action=adminmode"> if($action eq 'adminmode') { do stuff } else { do other stuff }
but I am not sure if this is correct. How do I specify whether the user is in "adminmode" or not?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using CGI and perl to specify modes which control page functionality.
by Anonymous Monk on Jul 02, 2013 at 14:48 UTC | |
by Anonymous Monk on Jul 02, 2013 at 14:55 UTC | |
by Bowlslaw (Acolyte) on Jul 02, 2013 at 15:46 UTC | |
by Anonymous Monk on Jul 02, 2013 at 20:02 UTC | |
by Bowlslaw (Acolyte) on Jul 02, 2013 at 22:43 UTC | |
|
Re: Using CGI and perl to specify modes which control page functionality.
by derby (Abbot) on Jul 02, 2013 at 17:05 UTC | |
|
Re: Using CGI and perl to specify modes which control page functionality.
by Shuraski (Scribe) on Jul 04, 2013 at 15:11 UTC |