I think he is from Croatia. moreover in the last part of this message I think what he is pretending is to accomplish a better way of inserting into the database.
I think that one of his goals is to avoid the use of the variable names when inserting I believe that he pretends to catch the values of the CGI.pm and : HTML::template and using that values for inserting into the database instead of using names like


my $turistobjekt = "dadas";
my $adresa = "sdasdasdfADRESA";
my $brojgrada = "1";



Maxipoint Rep Office wrote:

-----Original Message-----
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 08, 2004 1:06 AM
To: 'Maxipoint Rep Office'; [EMAIL PROTECTED]
Subject: RE: create connection from html form into insert MySQL data script


Maxipoint Rep Office <[EMAIL PROTECTED]> wrote:

: I am successful insert data in MySQL with code below:

  I am having trouble understanding your message. I assume
English is not your first language.

: #!/usr/bin/perl -w
: use strict;

   Great start!
RE: yeah.. :-)



: use DBI();
: use CGI;
: use HTML::Template;
:
: # Connect to the database.
: my $dbh =
:     DBI->connect("DBI:mysql:database=MYDABASE;host=localhost",
:     "MYDBUSERNAME", "MYPASS",
:     {'RaiseError' => 1});
:
: my $turistobjekt = "dadas";
: my $adresa = "sdasdasdfADRESA";
: my $brojgrada = "1";
: my $grad = "1";
: my $manjemjesto = "1";
: my $otok = "1";
: my $regija = "1";
: my $ime = "1";
: my $prezime = "1";
: my $tel = "1";
: my $mob = "1";
: my $fax = "1";
: my $email = "1";
: my $username = "1";
: my $password = "1";
: my $status = "1";

   Are all these variables supposed to be coming from
an HTML form? Is that what you want to use CGI.pm for?
RE: yes, I wish delete it in script and that form send same values using
CGI.pm and HTMP::template



: $dbh->do("INSERT INTO portal (turistobjekt, adresa, brojgrada,
: grad, manjemjesto, otok, regija, ime, prezime, tel, mob, fax,
: email, username,
: password, status) VALUES ('$turistobjekt', '$adresa',
: '$brojgrada', '$grad', '$manjemjesto', '$otok', '$regija',
: '$ime', '$prezime', '$tel', '$mob', '$fax', '$email',
: '$username', '$password', '$status')" or die $dbh->errstr);
:
: $dbh->disconnect();
:
: --------------------
:
:
: MY QUESTION: How on much simpler way with CGI.pm and
: HTML::template, instead variables my $turistobjekt, my
: $adresa, my $brojgrada etc. RECEIVE any data from html form
: successful?

   HTML::Template is used to generate HTML pages. You are
not doing that here. What task are you trying to accomplish,
(besides the DB insert)?
RE: ok, I can resolve HTML::template alone later, can you help me with
CGI.pm... how send data into inerst script from form? not with variables
like I am create here?

-GP






-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to