in reply to Re: foreach and if inside <<ENDHTML? Can they work?
in thread foreach and if inside <<ENDHTML? Can they work?

Heres a link to the html that links to the post.cgi You can feel out the form and hit submit if you want to see what i am working with. I am on a tripod server and i can only use the pm that they previde. See my problem!
  • Comment on Re: Re: foreach and if inside <<ENDHTML? Can they work?

Replies are listed 'Best First'.
Re: Re: Re: foreach and if inside <<ENDHTML? Can they work?
by blokhead (Monsignor) on Aug 13, 2003 at 07:43 UTC
    HTML::Template is a pure Perl module, so you can just upload the .pm file and require it from your script.

    blokhead

Re: Re: Re: foreach and if inside <<ENDHTML? Can they work?
by frogboy (Initiate) on Aug 13, 2003 at 07:57 UTC
    Thanks guys for the help. This is my finally script please tell me what you think. It sends it another script that thn emails me using my mail porgram in tripod the tripodmail.pm Feel free to check out the script at HERE If you check it out and find a problem please tell me.
    #!/usr/bin/perl require TripodMail; print "Content-type:text/html\n\n"; $FORM{'GraphicsDesign'} = ""; $FORM{'Screenprinting'} = ""; $FORM{'Digitizing'} = ""; $FORM{'Embroidery'} = ""; $FORM{'Manufacturing'} = ""; $alpha = ""; $printy_stuff = ""; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value;} if ($FORM{'services'} eq "yes") { $printy_stuff = qq( Services:<br> $FORM{'GraphicsDesign'}<br> $FORM{'Screenprinting'}<br> $FORM{'Digitizing'}<br> $FORM{'Embroidery'}<br> $FORM{'Manufacturing'}<br>); } if ($FORM{'textarea'} ne "") { $alpha = "Coments: $FORM{'textarea'}"; } print <<EndHTML; <html><head><title>Order Form</title></head> <body> <h1>Please check your order.</h1> If all the info is correct please click yes, if not click the back but +ton on your browser. <p></p>$FORM{'firstname'} $FORM{'lastname'}<br> Email: $FORM{'email'}<br> Phone Number: $FORM{'number'}<br> <br>Catalog: $FORM{'catalog'}<br> Brand: $FORM{'brand'}<br> Item number: $FORM{'inumber'}<br> Color: $FORM{'color'}<br> Sizes: $FORM{'size'}<br><br> $printy_stuff<BR> $alpha <form method="post" action="post.cgi"> <input type="hidden" name="firstname" value="$FORM{'firstname'}"> <input type="hidden" name="inumber" value="$FORM{'inumber'}"> <input type="hidden" name="number" value="$FORM{'number'}"> <input type="hidden" name="catalog" value="$FORM{'catalog'}"> <input type="hidden" name="Embroidery" value="$FORM{'Embroidery'}"> <input type="hidden" name="brand" value="$FORM{'brand'}"> <input type="hidden" name="lastname" value="$FORM{'lastname'}"> <input type="hidden" name="Screenprinting" value="$FORM{'Screenprintin +g'}"> <input type="hidden" name="size" value="$FORM{'size'}"> <input type="hidden" name="email" value="$FORM{'email'}"> <input type="hidden" name="color" value="$FORM{'color'}"> <input type="hidden" name="Digitizing" value="$FORM{'Digitizing'}"> <input type="hidden" name="GraphicsDesign" value="$FORM{'GraphicsDesig +n'}"> <input type="hidden" name="services" value="$FORM{'services'}"> <input type="hidden" name="Manufacturing" value="$FORM{'Manufacturing' +}"> <input type="hidden" name="button" value="submit"> <input type="hidden" name="textarea" value="$FORM{'textarea'}"> <input type="submit" name="button" value=" yes "> </form> EndHTML print "</body></html>\n";