RE: why do i get a file download prompt?

2004-07-27 Thread Bob Showalter
Gary Jennings wrote: > Hi; > > > > I get a file download prompt when I run the following script. Can > anyone let me know why? I am simply trying to print the contents of > a file. Thanks. Displaying a download box is behavior of your browser. Your Content-Type header is botched, so maybe tha

why do i get a file download prompt?

2004-07-27 Thread Gary Jennings
Hi; I get a file download prompt when I run the following script. Can anyone let me know why? I am simply trying to print the contents of a file. Thanks. #!/usr/bin/perl print "content type: text/html\n\n"; $file = "mydatabase"; open (myfile,"$file"); $recs = ; while ($recs ne "") { print $recs;

Re: A question on Radio buttons in the CGI::Form package

2004-07-27 Thread Wiggins d Anconia
> Hi, > >I am trying to generate radio buttons using the CGI::Form package. > My radio buttons need to be vertically aligned with some other HTML > elements in between them. For e.g. > >Radio 1 > >Radio 2 > >This obviously precludes me from using the 'radio_group' method as

Re: File upload question

2004-07-27 Thread Sean Davis
Bob, Thanks. That was the issue. Sean On Jul 27, 2004, at 1:31 PM, Bob Showalter wrote: Sean Davis wrote: I am trying to write a toy script that will ask for an upload file and then echo that file back to the user on the browser. However, if I do this all in one script like the following, I get n

A question on Radio buttons in the CGI::Form package

2004-07-27 Thread Kasturirangan Rangaswamy
Hi, I am trying to generate radio buttons using the CGI::Form package. My radio buttons need to be vertically aligned with some other HTML elements in between them. For e.g. Radio 1 Radio 2 This obviously precludes me from using the 'radio_group' method as that does not allow me

RE: File upload question

2004-07-27 Thread Bob Showalter
Sean Davis wrote: > I am trying to write a toy script that will ask for an upload file and > then echo that file back to the user on the browser. However, if I do > this all in one script like the following, I get no echoed file. > However, if I instead use a separate HTML form and submit to my >

Re: File upload question

2004-07-27 Thread Wiggins d Anconia
> On Tue, Jul 27, 2004 at 12:37:11PM -0400, Sean Davis wrote: > > if ($q->param('upload_file')) { > > my $fh=$q->upload('upload_file'); >^^ > > Perhaps that should be param, not upload. I'm not familiar with an > upload method in the CGI module. > > Please check the docs,

Re: File upload question

2004-07-27 Thread T. Raymond
Hi Sean, I'm not sure but try taking out "$q ->" in front of your print statements. i.e.: print header(); my $value=$q->param('upload_file'); Also, in the above you set the value of my $value but then do not use it elsewhere in your script. In the below you end up using the value of my $value.

Re: File upload question

2004-07-27 Thread William McKee
On Tue, Jul 27, 2004 at 12:37:11PM -0400, Sean Davis wrote: > if ($q->param('upload_file')) { > my $fh=$q->upload('upload_file'); ^^ Perhaps that should be param, not upload. I'm not familiar with an upload method in the CGI module. William -- Knowmad Services Inc. http:/

File upload question

2004-07-27 Thread Sean Davis
I am trying to write a toy script that will ask for an upload file and then echo that file back to the user on the browser. However, if I do this all in one script like the following, I get no echoed file. However, if I instead use a separate HTML form and submit to my script, it works fine.