[eluser]Unknown[/eluser]
Hi!
I have one problem with insert data to table. I making import e-mail adresses form computer (form, textarea) to mysql datebase. In form, users giving dates in two others ways.
One is:
email@adres, name1
email2@adress, name2
email3@adress, name3
Secound is:
email@adres
emai2@adres
emai3@adres
I don't know, why i can check one of this way, when i adding this dates to mysql.
My code is:
Code:
$mail = explode("\n", $this->input->post('import'));
$dlugosc=count($mail);
for($i=1;$i<=$dlugosc;$i++){
$im=explode(",", $mail[$i]);
if($im[1]==null)$im[1]=' ';
$new = array
(
'email_zapisanego' => $im[0],
'imie' => $im[1]
);
$this->crud_model->save_user('subskrybenci',$new);
Sorry, i'm from polish. I little speak English.