in reply to Re^3: retrieving similar form params
in thread retrieving similar form params
Using your data structure, this is what I aim to do.
Each row of fields has to be entered into my database like that.my %param = ( fname1 => "Fred", lname1 => 'Bloggs', email1 => 'fred@xyzzy.com', fname2 => "Joe", lname2 => 'Bloggs', email2 => 'joe@plugh.com', fname3 => "Sue", lname3 => 'Brown', phone1 => '555-1234-567', ); # assuming everything above passes the sanity check my $stored = qq(INSERT INTO addbook (fname, lname, phone, address, ema +il) VALUES(?,?,?,?,?); my $sth = $dbh->prepare($data); $sth->execute($fname#, $lname#, $phone#, $address#, $email#) or die $d +bh->errstr;
Thank you. </code>
|
|---|