first is the page where user inserts text : see attachement
second .... the user gets the text splited in rows by every spaces or tabs or .... see attachements
and then a need to put numbers at each row ( but i get only number 4 every time ).... and then to insert every row into mysql db
so .... a have this code but something i dont make right ... 🙁
print("<table align=center width=800px ><tr><td class=headingadd2>");
if ($_GET['action'] == "ccommsr_results") {
$primary_info_c = "<br/>".$_POST["primary_info_c"];
$testNumbers1 = array( $primary_info_c );
$replacements = array(" +", " ", " ", " ");
$allowedchars = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "K", );
$i=1;
foreach ($replacements as $v) {
$testNumbers1 = preg_replace('/\s+/',"<br />".$i." => ", $primary_info_c);
$i=$i+1;
}
print($testNumbers1."<br /> =========testNumbers1");
print($array."<br /> =========array");
print("</td></tr></table>");
} else {
print("<form method=\"post\" action=\"ccommsr.php?action=ccommsr_results\">");
print("<textarea id=texta name=primary_info_c cols=100 rows=50>".htmlspecialchars($_POST["primary_info_c"])."</textarea>");
print("<br /><input type=submit value=\"".$tracker_lang['go_go_go']."\"></form>");
print("</td></tr></table>");
}