RE: Modifying Parameter Values

2005-01-10 Thread Hellman, Matthew
http://search.cpan.org/~lds/CGI.pm-3.05/CGI.pm#SETTING_THE_VALUE(S)_OF_A_NAMED_PARAMETER: $query->param('fooparam','foovalue'); OR $query->param(-name=>'fooparam',-value=>'foovalue'); $q->param( table => "vendors" ); # INCORRECT $q->param(-name=>'table',value=>'vendors'); # CORR

RE: Ignoring enter/newline in forms

2005-06-05 Thread Hellman, Matthew
wow, that's some serious regex just to remove a leading character from a string. anyway, this is not a CGI issue per se. see if this helps: http://ppewww.ph.gla.ac.uk/%7eflavell/www/formquestion.html >>-Original Message- >>From: Shawn Smith [mailto:[EMAIL PROTECTED] >>Sent: Friday, June 0

RE: How to browse and select a remote file and then return the filename

2005-07-07 Thread Hellman, Matthew
Do you mean you just don't want the actual file uploaded...just the name of it? You can probably accomplish this by having the file form field in a separate form (that is not submitted). Then use javascript to populate the field in the form that actually does get submitted. -Original Message

RE: Help downloading a file

2007-05-01 Thread Hellman, Matthew
The original intent was to generate a save-as dialog box instead of displaying the PDF inline? I believe the problem with this is that it can cause blank browser windows to open, which some people don't like. This is a browser issue and I'm not aware of an alternative. Removing the content-disposit

RE: Variable Name Survey Form Input

2007-06-13 Thread Hellman, Matthew
You can read all the query param names into an array using the param method of cgi.cpm. Then you just loop through the array. See: http://search.cpan.org/~lds/CGI.pm-3.29/CGI.pm#FETCHING_THE_NAMES_OF_ALL _THE_PARAMETERS_PASSED_TO_YOUR_SCRIPT: @params = $query->param foreach my $param ( @params )

RE: Undefined subroutine: if (param('admin') eq "y")

2008-02-20 Thread Hellman, Matthew
If you want to use the function oriented interface for CGI, you need to import the functions: See: http://search.cpan.org/~lds/CGI.pm-3.33/CGI.pm#PROGRAMMING_STYLE example: http://search.cpan.org/~lds/CGI.pm-3.33/CGI.pm#A_COMPLETE_EXAMPLE_OF_A_S IMPLE_FORM-BASED_SCRIPT >>-Original Message-

RE: Creating a Logon Form

2008-12-10 Thread Hellman, Matthew
If you're serious about security, you have some work to do;-) This application is very likely vulnerable to SQL injection and XSS injection. 1) for all CGI scripts, turn on taint and strict mode, and then sanitize your input. There are many ways to sanitize your input, but you might start with

RE: content type headers

2009-07-02 Thread Hellman, Matthew
>>Hi, >> >>I've got some old code to deal with and I have hit a problem. >> >>If there is a request for a page that has mixed content EG: 'text/html' >>and 'image/jpeg', the image media is not being displayed correctly under >>the FireFox browser. >> >>The way things currently work is that media ot

RE: content type headers

2009-07-02 Thread Hellman, Matthew
ageid=123456&size=800x600 the HTTP response headers would probably shed the most light on the problem, nudge, nudge;-) >>-Original Message- >>From: Gunnar Hjalmarsson [mailto:nore...@gunnar.cc] >>Sent: Thursday, July 02, 2009 1:24 PM >>To: beginners-cgi@perl

RE: content type headers

2009-07-06 Thread Hellman, Matthew
Ah, mod-perl{{{ shudder }}}. "$asperl->setContentType($apache->content_type());" I think there's a bunch of relevant code we're not seeing. Without having been set prior, I don't believe $apache->content_type will return the right header in this situation because it relies on file extensio