in reply to Re^4: unsupported REQUEST_METHOD?
in thread unsupported REQUEST_METHOD?
You really shouldn't embed variables in your SQL queries, this can lead to SQL injection attacks ( http://xkcd.com/327/, http://bobby-tables.com/). If you insist on using $dbh->do you should use $dbh->quote likeuse CGI 'param'; my %formValues = map { $_ => scalar param($_) } param;
See DBI recipes$dbh->do( sprintf "Insert into sell values (%s)", join ' , ', map { $dbh->quote($_) } $tid, $formValues{'salesperson'}, $clid, $formValues{'comid'}, $formValues{'ps'}, $formValues{'ds'}, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: unsupported REQUEST_METHOD?
by jtm62 (Initiate) on Nov 15, 2009 at 20:16 UTC |