Hello,
when I execute this script :
"#!/usr/bin/perl -w
use DBI;
print "Content-type:Text/html\n\n";
print "Pilotes disponibles:\n";
@drivers=DBI->available_drivers;
foreach(@drivers)
{
print "$_ \n";
}
$driver="mysql";
@sources=DBI->data_sources($driver);
print "\nSources de donnees disponibles:
List,
I would like to be able to move a row from one table to another table within
the same database.
Off the top of my head I suppose the SQL command would look similar to the
following...
my $sql = 'MOVE * FROM table1 WHERE unique_id = '' TO table2'. FINISH
Then I would like to be able
Hytham wrote:
> hi gurus,
> first of all, am really gracefull about all who
> sends me tips of how to
> make this thing work, but, unfortunately, it doesn't
> yet.
I'm not sure if this will help, but here is a snippet from a program I've
been working on that uploads html files from a client
Just wanted to say two things:
1) These are my sentiments exactly - I've only been on this list for a few
days and I've seen a lot of religous responses. However, as a newbie, I
don't mind extra flack as long as I can get to the meat of the matter (ie:
sometimes when you guru's respond, you make
Hello everyone:
Can anyone tell us where to find a list of all of the extensions used in
cgi programming.
Such as in this address:cgi-bin/rightnow.cfg/php/
what would type of Perl file would*.cfg be?
We are trying to learn what they are and the individual purposes behind them.
If any
Check out the CGI documentation - it's very thorough and has a lot of
excellent examples. Looking at the synopsis example, it looks like you're
missing an if ($q->param()) { ... } around the file uploading part of your
code. Give that a shot...
Jason
> here it is:
> #!/usr/bin/perl
> use CGI;
hi gurus,
first of all, am really gracefull about all who sends me tips of how to
make this thing work, but, unfortunately, it doesn't yet.
here it is:
#!/usr/bin/perl
use CGI;
$q = new CGI;
print $q->header,
$q->start_html('title here'),
$q->h1('Please fill this form'),
$q->start_multip
Curtis,
*sigh* Thanks for the information.
I'll tell you, my site is all flash, and I wanted to make it a bit more
interesting by having some dynamic data on the site facilitated by CGI.
Trying to find a -simple- resource for learning Perl has been a real
struggle. Perl seems more like a relig
Hello,
My goal is following : after user accesses http://host/script.pl ( either
by direct link or by submitting the filled form ) I'd like to open a
"Save as" dialog - to let him download a binary ( compressed ) file.
1) print header( "application/x-gzip" );
open ( FIN, "TXTs.tar.gz"
> "Thomas" == Thomas Jakub <[EMAIL PROTECTED]> writes:
Thomas> I'm trying to see when a file was last modified.
Thomas> Here's the code segment...
Thomas> open filename, ">temp";
Thomas> #random time consumming statements go here
Thomas> $then = time;
Thomas> utime $then, $then, filename;
Th
> "Brian" == Brian Jackson <[EMAIL PROTECTED]> writes:
Brian> Unfortunately I don't have any Perl books available to me at this time
Brian> and I am trying to find the answer to this on the web, but have had no
Brian> luck thus far...does anyone know if there is a shift operator in Perl
Brian
Christopher Zukowski <[EMAIL PROTECTED]> said something to this effect on
07/09/2001:
> How would that be diff from $mins = sprintf("%02d",$QCTAvgSecs/60);
>
> or would it?
I have no idea what $QCTAvgSecs is; it might, or it might not.
Intuitively, though, I would say that no matter what $QCTA
How would that be diff from $mins = sprintf("%02d",$QCTAvgSecs/60);
or would it?
At 01:46 PM 7/9/2001, darren chamberlain wrote:
>Thomas Jakub <[EMAIL PROTECTED]> said something to this effect on 07/09/2001:
>> in c++ you can floor a variable to drop the decimal
>> points. How can you do this
--- "G.P.Gaudreault" <[EMAIL PROTECTED]> wrote:
> All,
>
> Which is faster, using the CGI.pm param function to get form input, or parsing out
>the hash
> within my script? I've got a script that currently uses a lot of system resources,
>and I'm
> looking for ways to optimize it.
[snip]
> Is
Thomas Jakub <[EMAIL PROTECTED]> said something to this effect on 07/09/2001:
> in c++ you can floor a variable to drop the decimal
> points. How can you do this with perl?
Use the int function (perldoc -f int).
my $pi = 3.1415927;
print int $pi;
# prints 3
(darren)
--
Westheimer's Discove
Use integer, e.g.
print "her age is integer($age)";
The function will round up to the next highest number.
-Original Message-
From: Thomas Jakub [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 3:36 PM
To: [EMAIL PROTECTED]
Subject: floor
in c++ you can floor a variable to drop
in c++ you can floor a variable to drop the decimal
points. How can you do this with perl?
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
All,
Which is faster, using the CGI.pm param function to get form input, or parsing out the
hash within my script? I've got a script that currently uses a lot of system
resources, and I'm looking for ways to optimize it.
I have the following subroutine in my script:
sub getform {$buf
Well, I posted my method recently (see Re: Required Fields Module), BUT
fliptop's methodology is better if your form has a group of checkboxes with
the same name or a multiple selection box (one example I didn't think of
that you pointed out, flipdog :)) or some other form design where your query
Thomas Jakub wrote:
>
> How can I tell how much time a program has been
> running for in a perl script? I tried to do $time01 =
> localtime() and $time02 = localtime() and then
> subtract $time01 from $time02, but I always get zero,
> even though there was about five or so minutes of
> activity
One thing that snagged me with printing to a filehandle is the binmode. I
was uploading an Excel spreadsheet and writing it, but it would become
corrupted (b/c it's a binary file). So if you're dealing with binary files
(and according to the docs, if your system knows the difference [which for
m
Jason Purdy wrote:
>
> Found a link that described how to do this on the JavaScript side:
> http://www.webdeveloper.com/javascript/js_form_example.html
adequate, but useless if the user has javascript disabled in their
browser.
a good choice *only* if it's an internal application where you can
I posted the original message, but my code is not an alternative to CGI -
it's a supplement to validate a form-fed CGI script and that certain
elements were filled out by the user. It requires CGI, actually.
Found a link that described how to do this on the JavaScript side:
http://www.webdevelop
Hi Thomas,
use the stat function with the file.
you canget more information by typing
perldoc -f utime
and
perldoc -f stat
reagrds
-- Gabor
On 2001.07.09 21:13 Thomas Jakub wrote:
> I'm trying to see when a file was last modified.
> Here's the code segment...
>
> open filename, ">temp";
> #r
How can I tell how much time a program has been
running for in a perl script? I tried to do $time01 =
localtime() and $time02 = localtime() and then
subtract $time01 from $time02, but I always get zero,
even though there was about five or so minutes of
activity in between the parts where $time01
you can also type in
perldoc perlop
and search for bitwise in the file
or you can also search "bitwise" on
www.perldoc.com
there you can find explanation on how these things work.
-- Gabor
On 2001.07.09 20:26 Camilo Gonzalez wrote:
> Yes,
>
> >> and <<
>
> -Original Message-
> Fro
I'm trying to see when a file was last modified.
Here's the code segment...
open filename, ">temp";
#random time consumming statements go here
$then = time;
utime $then, $then, filename;
print $then;
close filename;
The problem is, every time I do this, I don't get the
time of when I last added
Yes,
>> and <<
-Original Message-
From: Brian Jackson [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: Shifting bits
Unfortunately I don't have any Perl books available to me at this time
and I am trying to find the answer to this on the we
Unfortunately I don't have any Perl books available to me at this time
and I am trying to find the answer to this on the web, but have had no
luck thus far...does anyone know if there is a shift operator in Perl
that allow me to shift bits.
Marcus Willemsen wrote:
>
> Probably I got it all wrong but can someone give me some general advise how
> to handle such problems? Use a JavaScript to check the input?
you can use javascript, but that won't work if the user has disabled
javascript in their browser.
i use a 3-step process to val
--- fliptop <[EMAIL PROTECTED]> wrote:
> > Not true. Printing the file contents directly to the screen is a common method of
>testing
> whether
> > or not the file upload was successful and has nothing to do with whether or not
>Hytham was
> > properly uploading the file.
>
> yes, but the orig
Curtis Poe wrote:
>
> --- fliptop <[EMAIL PROTECTED]> wrote:
> > you need to tell perl to print the uploaded file to a file on the hard
> > drive:
>
> [ snip ]
>
> Not true. Printing the file contents directly to the screen is a common method of
>testing whether
> or not the file upload was s
--- fliptop <[EMAIL PROTECTED]> wrote:
> > > > since I don't use CGI.pm for basic web stuff, I have my own function
> > > > getting values out of the query string, and it was only giving me the last
> > > > value of MultipleSelectMenu -- bad :(
> > >
> > >that's why you'll be better off just alway
--- fliptop <[EMAIL PROTECTED]> wrote:
> Hytham Shehab wrote:
> >
> > hi gurus,
> > i use the upload() function in the CGI module to get a file in the
> > filefield tag, but i don't understand how to get it to the server?
> > $fh=$q->upload('file_to_be_uploaded');
> > while(<$fh>){
> > pr
Guillaume Denizot wrote:
>
> Hello, excuse me for my english but...
> I have installed successfuly Apache, Perl, MySQL (DBI) and
> DBD-mysql.
> test.pl is a perl file which run.
> What should I write in my home page:
> ?
>
> How should I configure httpd.conf to execute it?
in http.conf:
A
Hi all,
I'have almost no experience in programming or writing CGI Scripts so
perhaps my question isn't very clever.
My problem concern the evaluation of From Input. What's the best way to
check wheather a field contains input or not. What I want to do, is to set
up a form that has to be filled
Hytham Shehab wrote:
>
> hi gurus,
> i use the upload() function in the CGI module to get a file in the
> filefield tag, but i don't understand how to get it to the server?
> $fh=$q->upload('file_to_be_uploaded');
> while(<$fh>){
> print;
> }
you need to tell perl to print the uploaded f
hi gurus,
i use the upload() function in the CGI module to get a file in the
filefield tag, but i don't understand how to get it to the server?
$fh=$q->upload('file_to_be_uploaded');
while(<$fh>){
print;
}
but nothing happens, i keep searching about the file in the directory that
should be
Hello, excuse me for my english but...
I have installed successfuly Apache, Perl, MySQL (DBI) and
DBD-mysql.
test.pl is a perl file which run.
What should I write in my home page:
?
How should I configure httpd.conf to execute it?
Thanks...
__
At 07:03 09.07.2001 -0700, Ask Bjoern Hansen wrote:
>Aaron Craig <[EMAIL PROTECTED]> writes:
>
>[...]
> > test.cgi?MultipleSelectMenu=1&MultipleSelectMenu=2
> >
> > since I don't use CGI.pm for basic web stuff, I have my own function
> > getting values out of the query string, and it was only givi
Aaron Craig <[EMAIL PROTECTED]> writes:
[...]
> test.cgi?MultipleSelectMenu=1&MultipleSelectMenu=2
>
> since I don't use CGI.pm for basic web stuff, I have my own function
> getting values out of the query string, and it was only giving me the last
> value of MultipleSelectMenu -- bad :(
that
I'm not familiar with WinCGI, but your code is missing the important shebang
line. I have Apache running on my Windoze box and my shebang is:
#!\Perl\bin\perl
Everything's off my C drive and the DOS path to Perl is: C:\Perl\bin\perl.
Jason
- Original Message -
From: "nila devaraj" <[E
Gary Stainburn wrote:
>
> If you just want restricted access, then Apache and most other servers have
> some form of user ID/Password control to restricted areas of a web site.
if you are running apache, then you should also consider the mod_perl
way of doing it.
with mod_perl (or .htaccess, fo
skazat <[EMAIL PROTECTED]> said something to this effect on 07/09/2001:
> use the CGI.pm module, checkbox values will come back as an array, so do
> something like,
>
>
> my $q = new CGI;
> my @checked_values = $q->param('whatever_row_i_want_to_chuck');
>
>
> then use the DBI module to chuck
I can at least point you toward the modules I would use for this process
>At 12:01 09.07.2001 +0200, you wrote:
>Dear subscribers,
>
>I am working out an idea for a (set of) perl scripts that would provide
>the following:
>
>* A login form asking for a unique username/password combination;
CGI.
Dear subscribers,
I am working out an idea for a (set of) perl scripts that would
provide the following:
* A login form asking for a unique username/password combination;
* Validating the user input (using a stored user database) and
redirecting the user accordingly;
* Maintaining the state, i
At 23:14 08.07.2001 -0400, Jason Purdy wrote:
>I forgot the print $query->header part of the code. I also updated the code
>to accept '0' values by grepping within the keywords. I currently don't
>have to worry about multivalued parameters - I don't design my forms that
>way.
Ouch, I just got
Yay! I'm stupid!! Just found why it didn't show :)
Thanks!!
Greg.
-> I try to use the NET:POP3 to retreive headers mails on a pop3
-> server, but I
-> can't retreive all header data :
-> By exemple I try to retreive a header of an message using the
-> return-path,
-> and in the informations I
I try to use the NET:POP3 to retreive headers mails on a pop3 server, but I
can't retreive all header data :
By exemple I try to retreive a header of an message using the return-path,
and in the informations I can find, I don't see this value, just:
"Return-Path: Received: from "
For the sender in
use the CGI.pm module, checkbox values will come back as an array, so do
something like,
my $q = new CGI;
my @checked_values = $q->param('whatever_row_i_want_to_chuck');
then use the DBI module to chuck it from the SQL table,
use DBI;
my $dbh = DBI->connect("$data_source", $user, $pass);
50 matches
Mail list logo