Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to separate info from html page <textarea>?

Status
Not open for further replies.

spewn

Programmer
Joined
May 7, 2001
Messages
1,034
hey, i have a form on my webpage and i need to parse the information from a textarea...

Code:
<textarea name=leads id=leads cols=60 rows=10 wrap=off>
john clark|24
fred murphy|19
julie jones|30
</textarea>

how do i read each line of the text area box?

- g
 
Simply do some data processing:

Code:
foreach (split "\n", $leads) {
    next unless /(.*?)\|(.*)/;
    print "Name = '$1', Value = '$2'\n";
}

- Miller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top