Well, basically, if I remove the 'print "' and the '";' at the end of each line and put it in an HTML file, the page will load and then it will automatically get redirected to my webmail. This is what I want, however I am getting an Internal Server Error when I try to run this. I am not too worried about error checking at this point, however I will eventually want to put some in. I would just like to get it running first. Any pointers on what might be wrong right now? I do not readily have access to the error logs, cause my hosting provider is cheap.

#!/usr/bin/perl ##################################################################### # Function : # # Load Webmail using the password provided # # Use it : # # webmail?username=myusername&password=mypassword&domain=mydomain # ###################################################################### my $username = param('username'); my $password = param('password'); my $domain = param('domain'); my $correct_usage = "Correct Usage: webmail.cgi\?username=YourUser +name\&password=YourPassword\&domain=YourDomain"; if ($username eq ""){ print "No username given.\n $correct_usage" } elsif ($password eq ""){ print "No password given.\n $correct_usage" } elsif ($domain eq ""){ print "No domain given\n $correct_usage" } else{ print "<HTML> <HEAD> <TITLE>Logging In...</TITLE> </HEAD> <BODY> <CE_NTER><B_>Logging into your webmail...please wa +it...</B_></CEN_TER> <FORM name=f action=https://webmail.secureserver.net/s +rc/redirect.php method=post> <INPUT type=hidden name=login_username value=$user +name> <INPUT type=hidden name=domain value=$domain> <INPUT type=hidden name=secretkey value=$password> <INPUT type=hidden name=js_autodetect_results valu +e=0 > <INPUT type=hidden name=just_logged_in value=1> <INPUT type=hidden name=activate_timeout value=yes +> </FORM>"; <SCRIPT language=JavaScript>document.f.submit();</SCRIPT> </BODY></HTML>"; }

In reply to Re: (jeffa) Re: CGI Auto Login by cdubbs94
in thread CGI Auto Login by cdubbs94

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.