Jump to content
SkyRanger

Text Area Entry

Recommended Posts

Not sure if possible, been doing a google search to try to find the answer. If somebody can directly me to location where I can figure out how to do this if it is possible. What I am trying to do is pull information from a text area and each line inserts in to separate row in mysql.

ex textarea contains:

email1@email.tld
email2@email.tld
email3@email.tld

I am trying to figure out how to put each address in to separate row in table.

 

Share this post


Link to post
Share on other sites

Explode the string on newline and you'll have an array of emails which you can loop through to insert. You may want to run additional checks for commas and/or whitespace just in case your users don't read the instructions.

Share this post


Link to post
Share on other sites

A better solution is to stop using text areas for data input (other than for blocks of text that are to be treated as blocks of text) and to use separate input fields for each separate pice of data.

Share this post


Link to post
Share on other sites

I have gotten the textarea entry to work but yeah Barand I am going to need to change over to separate fields  and use jquery to do the code as I need an extra field per row to be inserted.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.