• Importing users with CSV file into PHP-SecureArea

  • PHP-SecureArea

    You may want to import existing members into the script. This can be done by entering them into a csv file and importing them through the admin pages.

    You can import the user memebers with a given password, or if you leave the password blank, PHP-SecuerArea will automatically create a new password for you.

    You may also optionally define the expire date for the user. You can then use the cron job to control the manual users.

    Once imported the users become 'Manual' users and they will be able to access the selected secure area using the password.

    The fields that you may import are :

    Email address Mandatory  
    Password Optional If left blank PHPSecureArea will automatically create the password
    Expire date Optional The date the subscription will expire in the format yyyy-mm-dd, for example 2017-08-02 is 2nd of August 2017.
    name Optional  
    Telephone Optional  
    Mobile Optional  
    Address line 1 Optional  
    Address line 2 Optional  
    City Optional  
    State Optional  
    Country Optional  
    Post code Optional  

    Example of csv file with minimum entries :

    emailaddress1, , , , , , , , , , ,
    emailaddress2, , , , , , , , , , ,
    emailaddress2, , , , , , , , , , ,

    Example file : Click Here


    Example of csv file with password for each user :

    emailaddress1, password1, , , , , , , , , ,
    emailaddress2, password2, , , , , , , , , ,
    emailaddress3, password3, , , , , , , , , ,

    Example file : Click Here


    Example of csv file with all fields :

    emailaddress1, password1, expiredate1, name1, telephone1, mobile1, address_line1_1, address_line2_1, city1, state1, country1, zip_post_code1
    emailaddress2, password2, expiredate2, name2, telephone2, mobile2, address_line1_2, address_line2_2, city2, state2, country2, zip_post_code2
    emailaddress3, password3, expiredate3, name3, telephone3, mobile3, address_line1_3, address_line2_3, city3, state3, country3, zip_post_code3

    Example file : Click Here


    • The csv import only creates new users, it does not update existing users so if the email address is already found in the tblusers table, the import will ignore that email address and not import it.

    • You should make sure that all fields have been entered in the csv file or blank entries.

    • If you get any errors and want to re-create the users again, first delete the users from the Manage Users display in the PHP-SecureArea admin pages, and then check if the email address / password has been created in the htpasswd file. If they have been created, delete those entries as well. Then re-import the users. You have to delete the users because the import does not update users only creates new ones.