I'm trying to save the links that are entered in the text area field. The links are seperated by a new line/enter. So in the example I made here below, he should add 3 lines in the table for each url link. But for some reason he isn't doing that.
TEXT AREA
www.url1.com
www.url2.com
www.url3.com
HTML
<textarea id="url" name="url"></textarea>
PHP
$url = isset($_POST['url']);
$links_array = explode('\n', $url);
foreach($links_array as $url)
{
$query3 = mysql_query("INSERT INTO links(sigaren_id, link) VALUES ((SELECT id FROM sigaren ORDER BY id DESC LIMIT 1), '$url')");
}
Thanks in advance!
Kind regards