<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1011770" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1011770</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Just tried it.......</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/linking#comment-1067753</link>
    <description> &lt;p&gt;but am having a problem with it. &lt;/p&gt;
&lt;p&gt;I am using a primitive password control system which will disply the admin side of the script iff the password is corrct and a bad passowrd page if it is not.&lt;/p&gt;
&lt;p&gt;My problem is this:&lt;/p&gt;
&lt;p&gt;When I accessed my script I had forgotten to take put the else {&amp;amp;default} bit so it showed that message instead ofmy login.  I took this out (so there is no else) but nothing showed up. So I cahnged the &amp;amp;default for &amp;amp;ask_password (the main login screen). this worked. But when i presss ubmit it juist loads the login page again. I dont know why this is (actually I do but I dont know how to fix it). I am assuming it is doing this becase the function is not specified in the code richard gave me. Anyway, this is the code tghat checks the passoword:&lt;/p&gt;
&lt;p&gt;  &amp;amp;parse_form;&lt;/p&gt;
&lt;p&gt;  $password =  $input{&#039;password&#039;};&lt;br /&gt;
  $function = $input{&#039;function&#039;};&lt;/p&gt;
&lt;p&gt;  if ($function eq &quot;post&quot;) {&lt;br /&gt;
       if ($password eq $correctpass) {&lt;br /&gt;
           &amp;goodlogin;&lt;br /&gt;
       }&lt;br /&gt;
       &amp;nologin;&lt;br /&gt;
   }&lt;/p&gt;
&lt;p&gt;   &amp;amp;ask_password;&lt;/p&gt;
&lt;p&gt;and this is at the top:&lt;/p&gt;
&lt;p&gt;$section = param(&#039;section&#039;);&lt;/p&gt;
&lt;p&gt;if ($section eq &quot;admin&quot;) { &amp;admin; }&lt;br /&gt;
elsif ($section eq &quot;footer&quot;) { &amp;footer; }&lt;br /&gt;
elsif ($section eq &quot;header&quot;) { &amp;header; }&lt;br /&gt;
elsif ($section eq &quot;subscribers&quot;) { &amp;amp;subscribers; }&lt;br /&gt;
elsif ($section eq &quot;archive&quot;) { &amp;archive; }&lt;br /&gt;
elsif ($section eq &quot;sendmail&quot;) { &amp;sendmail; }&lt;br /&gt;
elsif ($section eq &quot;sendonemail&quot;) { &amp;amp;sendonemail; }&lt;br /&gt;
else {&amp;amp;ask_password}&lt;br /&gt;
exit;&lt;/p&gt;
&lt;p&gt;Can someopne help me???&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Jul 2000 19:25:29 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1067753 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/linking#comment-1067695</link>
    <description> &lt;p&gt;I&#039;ll try it later on today but it looks good. Thanks alot for your help &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Jul 2000 06:43:58 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1067695 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I see...</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/linking#comment-1067675</link>
    <description> &lt;p&gt;This is possible.&lt;/p&gt;
&lt;p&gt;Let&#039;s say you had three sections: admin, form, and default.  To call a seperate section, use a URL like this:&lt;/p&gt;
&lt;p&gt;script.cgi?section=admin&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;BEGIN {&lt;br /&gt; use CGI::Carp qw(fatalsToBrowser);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;use CGI qw(param header);&lt;br /&gt;print header;&lt;br /&gt;&lt;br /&gt;$section = param(&amp;#039;section&amp;#039;);&lt;br /&gt;&lt;br /&gt;if ($section eq &amp;quot;admin&amp;quot;) { &amp;amp;admin; }&lt;br /&gt;elsif ($section eq &amp;quot;form&amp;quot;) { &amp;amp;form; }&lt;br /&gt;else { &amp;amp;default; }&lt;br /&gt;exit;&lt;br /&gt;&lt;br /&gt;sub admin {&lt;br /&gt; print qq|This is the admin section|;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub form {&lt;br /&gt; print qq|This is the form section|;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub default {&lt;br /&gt; print qq|This is the default section|;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Hope that solved your question.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
 </description>
     <pubDate>Tue, 18 Jul 2000 01:58:25 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1067675 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/linking#comment-1067615</link>
    <description> &lt;p&gt;No, you misunderstand....&lt;/p&gt;
&lt;p&gt;I meant like &lt;a href=&quot;whatever&quot;&gt;NAME&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I want the script be one script but I want the admin area to link to different parts of the script. os can I do:&lt;/p&gt;
&lt;p&gt;&lt;a&gt;something&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or doews it have to me in multiple scripts and not one single one&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Jul 2000 16:03:50 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1067615 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/linking#comment-1067568</link>
    <description> &lt;p&gt;Simply put the functions in seperate sub routines.  The format for a sub routine looks like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;sub NAME_OF_SUB {&lt;br /&gt;&lt;br /&gt;#code here&lt;br /&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;To call a subroutine:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;amp;NAME_OF_SUB;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Just replace &quot;NAME_OF_SUB&quot; with the actual name of the subroutine.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
 </description>
     <pubDate>Mon, 17 Jul 2000 01:22:51 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1067568 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
