Author Topic: Import address book from csv file  (Read 11710 times)

Offline klemen

  • Newbie
  • *
  • Posts: 3
Re: Import address book from csv file
« Reply #15 on: May 16, 2007, 03:54:06 AM »
I figured it out, if anyone need it:

    $firstname = $data[0];
           $surname = $data[1];
           $name = $data[2];
           $email = $data[3];


   echo "name: " . $firstname. "\n";
   echo "surname: " . $surname. "\n";
   echo "name:" . $name. "\n";
   echo "email:" . $email. "\n";

 $query = "INSERT INTO `contacts` ( `contact_id` , `user_id` , `changed` , `del` , `name` , `email` , `firstname` , `surname` , `vcard` ) VALUES ( '', '$user_id', '1985-09-15 00:00:00', '0', '$name', '$email', '$firstname', '$surname', '' );";
   echo "
";

Offline FlexV

  • Newbie
  • *
  • Posts: 4
Re: Import address book from csv file
« Reply #16 on: October 01, 2007, 08:20:19 PM »
Thanks a lot!
Works perfektly! ;D
I save one hour or more !
Thanks