Jump to content


Photo

save into database from text area


  • Please log in to reply
2 replies to this topic

#1 greenba

greenba
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationBosnia and Herzegovina

Posted 13 March 2006 - 04:40 PM

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?

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 13 March 2006 - 05:57 PM

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

that should work..
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 greenba

greenba
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationBosnia and Herzegovina

Posted 13 March 2006 - 07:16 PM

thank you




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users