Jump to content

need some explanantion on a snippet of code


cluce

Recommended Posts

$handle = fopen("EmployeeLoginInfoRev2.csv","r");
while(($data = fgetcsv($handle, 1000, ",")) !== FALSE) 
{
   $username = $data[0];   
   $password = $data[1];  
   $f_name = $data[2];   
   $l_name = $data[3];   
   $email = $data[4];
   $last = $data[5];
   $failed = $data[6];
   $priv = $data[7];
   $company = $data[8];
   $division_number = $data[9];
   
   $sql = "INSERT INTO employees (username, password, f_name, l_name, email, last_login, failed_logins, privilege, company, division_number) VALUES ('$username', '$password', '$f_name', '$l_name', '$email', '$last', '$failed', '$priv', '$company', '$division_number')"; 
    
   mysqli_query($mysqli, $sql);   

   $counter++;
   echo 'SQL='.$sql.'<br/>';  

 

while(($data = fgetcsv($handle, 1000, ",")) !== FALSE)

 

What does this statement mean?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.