Hi psycho,
Thanks for your answer, but honestely i know very little php and im trying to understand what you've said.
First of all, i really don't care if the input is divided by a - or a space, or 4 spaces; i can sort that out as soon as my explode() works
Second, i though that inserting the value $res would give me as many records as i type in the textarea (for example, 1 2 3 4 5 6 7 8 should be working on that code.. im guessing).
So, to state a ground base, let's say i want to post this into the textarea:
2013/04/03 21:00-Bolivar-The Strongest-2.20-3.20-2.88-1-LFP 2013/04/03 21:00-La Paz-Oriente Petrolero-4.33-3.50-1.73 1-LFP 2013/04/03 21:00-Wilstermann-Universitario-1.91-3.40-3.60-1-LFP
That'd be an 8 input data with a - in the expode();
$a=explode('-',$text);
foreach($a as $res){
and then execute the query normally (without the $res=mysql_real_escape_string($_POST['res'])
$sql="INSERT INTO events (hometeam, awayteam, ratiohome, ratioaway, ratiox, sportid, starttime, liga) VALUES ('$res')";
$sql_result=mysql_query($sql,$link) or die(mysql_error());
Would this be right then? Because it continues giving me the same error...
Thanks a lot for your help!