> >I´m new with perl. I need to write a program that reads data 
> out of a 
> >form sent via internet and is able to interpret the data. I have 
> >written the form in html. Is perl right for the other parts? 
> How can I 
> >do this easyly? Are there any pre-witten programs or modules 
> existing 
> >for that?
> **************************************************************
> **************
> **
> 

Flames of rath!!! :)

> PHP is what I use.  www.php.net is easier than anything I've 
> found on perl. See also database language on the slightly 

Yeah right have yiu even used param in CGI. I personally don't like 
that variable being declared for me, it seems insecure as a user 
could use that knowledge to get info they shouldn't among other thigns.

> confusing www.mysql.com.  PHP database query looks like this:
> 
>       $myquery = "SELECT table.field FROM table WHERE 
> table.field = '$variable'";

What if $variable has single quotes or commas or other sql breaking 
stuff, Mr PHP pants? Or evil query altering input hat deletes 
records or drops tables or something?

>       $result = mysql_db_query($db, $myquery, $connection) or 
> die ("myquery failed.");
>       $arr = array();
>       $x = 0;
>       while(list($a) = mysql_fetch_array($result))
>       {
>               $arr[$x] = $a;
>             $x++;
>       }

Perl's database query can look like this:

my $query = "SELECT monkey, foo, bar from JoeMama WHERE You =".$dbh->quote($variable);
my $res = $dbh->selectall_arrayref($query) or die 'My query failed'.$dbh->errstr();
for(@{$res}) {
        my ($mon,$foo,$bar) = @{$_};
        do whatever with each record
}

And what does this have to do with parsing form input anyway?

Why is it PHP people always act like PHP is the only thing 
that can use databases, send email , and get form input?

Administering PHP on a server is a pain in the rear.

Don't worry everyone, I'm done ranting and shall speak no more of this post :)

> 
> Variables are GETed or POSTed automatically with the form on 
> submit.  You can use regex's also.
> 
> While this is off-topic re Perl, it's also a good idea to 
> have an informative subject line, like: "Parsing HTML form 
> output: to use or not to use Perl?" that is the question!
> 
> John

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to