आपको "एंटर" कैरेक्टर की तलाश में टेक्स्ट को पार्स करना होगा:
<?php
if(isset($_POST['url'])){
if(strpos($_POST['url'], "\n")){
$entries = explode("\n", $_POST['url']);
} else {
$entries = array($_POST['url']);
}
// connect to DB here
// then iterate over entries
foreach($entries as $e){
// build some type of Prepared Statement to protect from SQL Injection
$q = "INSERT INTO table (col1) VALUES (?)";
// bind $e to statements
// Execute SQL statements
}
// close DB connection
}
?>