On Wed, 12 Nov 2003 15:56:39 +0000, Dillon, John wrote: >> 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?
> PHP is what I use. Why do you post PHP code in a Perl newsgroup? > www.php.net is easier than anything I've found on perl. You mean that that the web-site www.php.net is easier than anything found on the programming language perl? Explain. > See also database language on the slightly confusing www.mysql.com. How is the web-site www.mysql.com confusing? Explain. And what has that got to do with Perl? > PHP database query looks like this: > > $myquery = "SELECT table.field FROM table WHERE table.field = '$variable'"; > $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++; > } This code isn't safe, but that's not PHP's fault. What happens if $variable is messed with? Similary job is done with only one line using Perl's DBI module, and this code is even secure compared to the PHP code above: my $arr = $dbh->selectcol_arrayref('SELECT field FROM table WHERE field = ?', undef, $variable); > Variables are GETed or POSTed automatically with the form on submit. That has nothing to do with the programming language on the server side, actually, but is a part of the HTTP implementation. > You can use regex's also. So can Perl, right? > While this is off-topic re Perl, [...] It really is! -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]