|
Posted by Moozie on May 9, 2005, 6:23 pm
Please log in for more thread options
Thanks. I tested your code. I made a cgi file called form.cgi and put
your code in. I entered a link in browser to thast cgi script. And
tested with the addition: http://www.mydomain.com/form.cgi?number=14
I thought I would get a page with only the hidden code in it. Nut I
got an server-error.
Error message:
Bad header=<input type="hidden" name = "num....
The content of the whole cgi file:
> use CGI;
> my $cgi = CGI->new();
> my $value = $cgi->param('number');
> $value = 0 unless (defined $value); # Set a default
> # Only allow numbers to protect against x-site scripting attacks
> $value = 0 unless (int($value) eq $value);
> print qq(<input type="hidden" name="number" value="$number">);
Is there a mistake?
Thanks
I am rather new on cgi, so please forgive me some nembie mistakes...
|