Jump to content

Archived

This topic is now archived and is closed to further replies.

greenba

save into database from text area

Recommended Posts

Hi,

I have the following text area:

<textarea name="textarea" cols="38" rows="10">
www.domain.com
www.domain1.com
www.domain2.com
www.domain3.com
</textarea>

What I would like is to know how to make to store those sites in my mySQL database one by one.

Any ideas?

Share this post


Link to post
Share on other sites
$domains=explode("\n",$_POST['textarea']);
foreach ($domains as $domain) {
mysql insert statement using $domain as the var to input
}

that should work..

Share this post


Link to post
Share on other sites

×

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.