I used your sugestions and changed the code. It still does not work now the prgram out puts

HTTP/1.1 302 Moved Server: Apache/1.3.19 (Unix) Status: 302 Moved Date: Thu, 14 Jun 2001 02:23:04 GMT location: http://storm.prohosting.com/fightior/cgi-bin/warrior.pl

#!/usr/local/bin/perl use CGI ':standard'; my $query = CGI->new(); my $cookie = $query->cookie(-name=>'username', -values=>"param('name')", -expires=>'+1h', -domain=>'.storm.prohosting'); print $query->header(-cookie=>$cookie); print start_html(); $name=param('name'); open FILE, "user/$name" or die "Error: $!\n"; my %data = (); while ( my $line = <FILE> ) { chomp $line; my ($key, $value) = split(/\s*:\s*/, $line); $data{$key} = $value; } close FILE; #this section checks if the password is correct and lets you into the +game or tells #you that the password was incorect if (param('password') eq $data{password}) {# if the password is correc +t you enter the game print $query->redirect(-uri=>'http://storm.prohosting.com/fightior/cgi +-bin/warrior.pl', -nph=>1); } if (param('password') ne $data{password}) {#this part tells you if th +e password was not open (NOPASS, "../password.htm"); for $line (<NOPASS>) { print $line; } } close NEWFILE ; close NOPASS; end_html();

In reply to Re: redirect and cookie problems by Anonymous Monk
in thread redirect and cookie problems by Anonymous Monk

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.