in reply to Determining which CGI submit() button was pressed

As a debugging tip, you might try this, to see what parameters you actually have, and what their values are:

At the top of your script, add one more use: use Data::Dumper;. Then, right after your print end_form; statement, add this line:

print "<pre> "; print Dumper Vars(); print " </pre>"

Now run the script and see what you get. It will dump all parameters as key/value pairs to the screen. You can also run it from the commandline. In fact, using CGI is really convenient; it lets you run scripts from the command line where you simply add the parameter list to the command line. For example, your script is named "games.pl"... so run it like this and see what output you get:

perl games.pl "gamename = test"

...that's assuming an MSDOS type OS. Change the quotes to work with whatever flavor of operating system you're on. The point is you'll see pretty clearly what the error messages (if any) are, and what else is going on. And above all, make sure you've got warnings enabled. That can often tell you what's wrong too.


Dave

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.