in reply to Quick Param Question
to detect if perl was invoked from a form. (If you've used submit(-name=>'somename'),then substitute "somename" for "submit".)unless (param('submit'))
When you just check to see if param() returns false, you're checking that there were no parameters, but when you specify "id=2" in a link, you do have a parameter. Checking for a parameter named "submit" checks if the "submit" button was clicked (or the user pressed enter), which is what lests you know the other parameters were set by the form, not a link.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Quick Param Question
by f00li5h (Chaplain) on Mar 29, 2007 at 03:17 UTC | |
by rodion (Chaplain) on Mar 29, 2007 at 03:51 UTC | |
by f00li5h (Chaplain) on Mar 29, 2007 at 05:00 UTC |