Hennikenno Posted June 19, 2009 Report Share Posted June 19, 2009 Sveiki. Man vienā lapā ir liels text laukums, kurā lietotājs var sarakstīt vairākus vārdus šādā virknē: Suns, kaķis, māja, ezers, krūms, koks Kā lai uztaisa tā, lai nākamā lapa, kas ar _POST saņem šo stringu, atdala katru vārdu (pēc komatiem) un katram izpilda vienu kveriju? Quote Link to comment Share on other sites More sharing options...
codez Posted June 19, 2009 Report Share Posted June 19, 2009 $arr=explode(',',$_POST['dati']); foreach($arr as $val){ db->queryf('INSERT INTO whatever SET dati=%s',array(trim($val))); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.