in reply to encoding URL ampersands?
The first if checks that there are parameters present, which is very handy as you can attach code to the else for this if, to generate a form. In other words, the same perl script processes form/url parameters and data submitted OR generates a html form to fill in.use CGI qw(:standard); if(param()) { if($a=param('a')) { /* code for url parameter a */ } } else { /* generate html form when not called with parameters */ /* the form submit url points to itself (the .pl) */ }
|
|---|