How to Join Member's Area Private Library Search Today's Topics p Login
Main Forums Discussion Tech Talk Mature Content Archives
   Nav Win
 Tech Talk
 Beyond the Basics
 "Action" Input and Conditionals
 1
Follow us on Facebook

 Moderated by: Ron   (Admins )

 
User Options
Format for Better Printing EMail to a Friend Not Available
Admin Print Send ECard
Passions in Poetry

"Action" Input and Conditionals

 Post A Reply Post New Topic   Go to the Next Oldest/Previous Topic Return to Topic Page Go to the Next Newest Topic 
Christopher
Moderator
Member Rara Avis
since 08-02-99
Posts 9130
Purgatorial Incarceration


0 posted 12-14-2002 05:44 AM       View Profile for Christopher   Email Christopher   Edit/Delete Message      Find Poems  View IP for Christopher

Cannot understand where I'm having a problem here, and it's something I really would like to have, so I don't end up with a different script for everythign I want to do.

This should simply print a form if it receives no $action" or print a single line if it receives the $action of "login."

No matter what I do, it gives me the form each and every time and I can't, for the life of me, see why. I appreciate any hints!

**********


#!/usr/local/bin/perl
require "toolbox.pl";

inputIn();

$email = $input{'email'};
$password = $input{'password'};
$action = $input{'login'};

if (! $action) {printForm();}
elsif ($action eq "login") {
            header();
            print qq~Action = $action~;
            footer();
        }


#####################
#####SUBROUTINES#####
#####################

#Print HTML form to login with
sub printForm {
    header();
    print qq~<form method="post" action="login.pl">
<div align="center">
<table width="350" bgcolor="#6699cc" cellpadding="0" cellspacing="0" border="0">
   <tr>
    <td height="30" valign="bottom">
<img src="imgs/1.gif" width="1" height="1" hspace="35"><strong>Email Address</strong>
</td>  
   </tr>
   <tr>
    <td height="30" valign="top">
<img src="imgs/1.gif" width="1" height="1" hspace="35"><input type="text" name="email" size="30" maxlength="50" value="">
</td>  
   </tr>
   <tr>
    <td height="30" valign="bottom">
<img src="imgs/1.gif" width="1" height="1" hspace="35"><strong>Password</strong>
</td>
   </tr>
   <tr>
    <td height="30" valign="top">
<img src="imgs/1.gif" width="1" height="1" hspace="35"><input type="password" name="password" size="30" maxlength="50" value="">
    <input type="hidden" name="action" value="login">
    <br>
</td>  
   </tr>
   <tr>
    <td height="10" valign="top">
<br>
    <div align="center"><input type="submit" value=" Submit "><input type="reset" value=" Reset "></div>
<br>
</td>  
   </tr>
   </table>~;
   footer();
}#End SR printForm

[This message has been edited by Christopher (12-14-2002 05:46 AM).]

Christopher
Moderator
Member Rara Avis
since 08-02-99
Posts 9130
Purgatorial Incarceration


1 posted 12-14-2002 07:25 AM       View Profile for Christopher   Email Christopher   Edit/Delete Message      Find Poems  View IP for Christopher

I wonder if I can set a timer letting me know when I should stop looking at the code because I'm not paying attention to the right things?

Nevermind - I figured it out.

$action = $input{'action'};

uhm - duh.
Christopher will be notified of replies
 Post A Reply Post New Topic   Go to the Next Oldest/Previous Topic Return to Topic Page Go to the Next Newest Topic 
All times are ET (US) Top
  User Options
>> Tech Talk >> Beyond the Basics >> "Action" Input and Conditionals Format for Better Printing EMail to a Friend Not Available
Print Send ECard

 

pipTalk Home Page | Main Poetry Forums

How to Join | Member's Area / Help | Private Library | Search | Contact Us | Today's Topics | Login
Discussion | Tech Talk | Archives | Sanctuary



© Passions in Poetry and netpoets.com 1998-2013
All Poetry and Prose is copyrighted by the individual authors