in reply to Re^3: inserting and showing data from an MS Access database
in thread inserting and showing data from an MS Access database
I was talking about this problem with a friend of mine who is vaguely familiar with Perl and he mentioned that $FORM{value} was the only way to retrieve the data frommy $sth_ins = $dbh->prepare("INSERT INTO users (firstname, lastname, s +tate, country) VALUES (?, ?, ? ,?)") or die "Couldn't insert the data +"; $sth_ins->execute($FORM{firstname}, $FORM{lastname}, $FORM{state}, $FO +RM{country});
Is there another way to do it or am I just overlooking something the way it is now?read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: inserting and showing data from an MS Access database
by davidrw (Prior) on Apr 12, 2006 at 12:51 UTC | |
by Anonymous Monk on Apr 12, 2006 at 22:10 UTC | |
by Anonymous Monk on Apr 12, 2006 at 22:26 UTC | |
by Anonymous Monk on Apr 12, 2006 at 22:50 UTC |