I am trying to figure out how to take multiple word input in a single text box in a form with each word separated by comma(,) and then paring the word based on comma and inserti
$str = $_POST['words']; $piece = explode(',',$str); foreach($piece as $substr){ mysql_query("INSERT INTO test (words) VALUES ('".$substr."');"; }