I have some Question and really need help on this thing

but i really dont know where to start from

I want to submit such data via html at once using text area

---START---- |FULLNAME: JANE DEO |BINF : 492BBJJ |PRICE: 10 |COUNTRY: GR ---END---
---START---- |FULLNAME: JOHN DEO |BINF : K92BBJJ |PRICE: 24 |COUNTRY: AS ---END---

my main point is i want to be able to store multiple data to database instead of inserting 1 by 1

so i want to store each data where is START and END

#!/usr/bin/perl -w use DBI; use CGI qw/:standard/; my $CGI = CGI->new; my $host = "localhost"; my $dbname = ""; my $usr = ""; my $pwd = ''; my $dbh_usr = DBI->connect("DBI:mysql:$dbname:$host", $usr, $pwd, { RaiseError => 1, }) or die $DBI::errstr; # $binf extracted from data where is |BINF : # $price extracted from data where is |PRICE: # $info this is the whole ---START---- and ---END--- my $upload = $CGI->param("data"); if ($upload) { my $update_info = $dbh_usr->prepare("INSERT INTO ITEMS(user, pid, basn +m, binf, info, status, price) VALUES(?,?,?,?,?,?,?)"); $update_info->execute('join123', '898', 'ion +o', $binf, $info, 'Active', $price); $update_info->finish; } $dbh_usr->commit; $dbh_usr->disconnect; print "Content-type: text/html\n\n"; print <<HTML; <!DOCTYPE html> <html> <head> </head> <body> <h1>The textarea</h1> <form method="POST"> <textarea name="data" rows="4" cols="50"></textarea> <br> <input type="submit" value="Submit"> </form> </body> </html> HTML

In reply to Extract data and store to db by frank1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.