Re: HELP! Perl&CGI problem
- From: "John" <john1949@xxxxxxxxx>
- Date: Sat, 31 Mar 2007 07:56:03 +0100
"yoyo" <thenewmcy@xxxxxxxxx> wrote in message
news:1165005776.835882.45230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi I am new at Perl and trying to create a small Hangman game.
http://verycoldice.tripod.com/cgi-bin/index2.cgi
(don't mind the labels in the table ->name, price,box)
Here's my problem exactly: Everytime the user types in a guess, it
refreshes the webpage and it generates a new random word from my array.
Obviously, I want to disable that and want the random word to stay the
same.
I tried to achieve this with a "do{ ... } while ( ... ); ", but it
doesn't seeem to work.
I believe it's the way I send my GET/POST request.
Shall you want to take a look at my code, I can post it as well.
Joey
If it refreshes the webpage then I guess no parameters are being kept.
use CGI;
my $word=param('word');
this will pick up the 'word' from the form.
Either as <input type='text' name='word' value='$word'></input> or whatever
or <input type='hidden' name='word' value='$word'></input>
Regards
John
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 99008 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
.
- Prev by Date: Re: Fundamental pipe questions
- Next by Date: Re: beginner counting question
- Previous by thread: Re: Fundamental pipe questions
- Next by thread: Ruby
- Index(es):
Relevant Pages
|