Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners Cgi > Re: pu****ng we...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 1407 of 1496
Post > Topic >>

Re: pu****ng web form params into mysql table

by shadkeene@[EMAIL PROTECTED] Jun 25, 2007 at 10:58 PM

On Jun 25, 3:19 pm, ricky.z...@[EMAIL PROTECTED]
 (Ricky Zhou) wrote:
> Greg Jetter wrote:
> > my $query = "insert into  tablename
> > (atablenaem1,atablename2,atablename3)VALUES($SubjPerform,$somthing2,
> > $somthing3);
>
> > # insert  stuff in the db
>
> > $dbh->do($query) or die "$DBI::errstr";
>
> To prevent SQL injection, etc.  It's strongly recommended that you use
> placeholders, which will automatically escape user-provided input for
you.
>
> my $query = "insert into tablename (atablenaem1,atablename2,atablename3)
> values (? ,?, ?)";
> $dbh->do($query, $SubjPerform, $somthing2, $somthing3) or die
> "$DBI::errstr";
>
>
Seehttp://search.cpan.org/~timb/DBI-1.57/DBI.pm#Placeholders_and_Bind_Va...
> for details.
>
> Hope this helps,
> Ricky
>
>  signature.asc
> 1KDownload

One more quick question...does it matter if I have the "names" from
the form (i.e. group title of synregime for values of ET, AT, RI, FLT,
CUT) or do I just input the values and mysql puts them in the right
group according to the value name.  That could be where I'm going
wrong.  Thanks!!
Shad
 




 6 Posts in Topic:
pushing web form params into mysql table
shadkeene@[EMAIL PROTECTE  2007-06-24 19:39:15 
Re: pushing web form params into mysql table
greg@[EMAIL PROTECTED] (  2007-06-25 14:08:54 
Re: pushing web form params into mysql table
ricky.zhou@[EMAIL PROTECT  2007-06-25 18:19:10 
Re: pushing web form params into mysql table
shadkeene@[EMAIL PROTECTE  2007-06-25 23:19:09 
Re: pushing web form params into mysql table
sdavis2@[EMAIL PROTECTED]  2007-06-26 10:02:34 
Re: pushing web form params into mysql table
shadkeene@[EMAIL PROTECTE  2007-06-25 22:58:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 10:17:59 CST 2008.