Pages

Showing posts with label Mysql-Codeigniter. Show all posts
Showing posts with label Mysql-Codeigniter. Show all posts

Wednesday, January 16, 2019

How to Make your Website PCI DSS Compliant

Web application that need to take payment online, then it has to follow the PCI DSS compliance (Payment Card Industry Data Security Standards). Ensuring that website is secure for taking payment and its not stolen the card data and password by anyone.

There are few point need to implement in application to follow PCI DSS compliance
a). Secure Hosting (Use SSL)
b). Use Latest TLS version of web server
c). Protect Card Data : Use Hosted payment form for any gateway (Not use website payment form)
d). CSRF token use for every request
e). Do not store card data in database : If need to reuse user card information then use token instead of storing card details
f). For reference if storing card data then store in masked format and store only last 4 digit of card number
g). Password Expiration policy
h). Always use strong password encryption algorithm for storing password in DB
i). Prevent XSS in application

Saturday, June 30, 2018

Codeigniter | How to Insert Batch Records

When you want to insert batch data into database table then you not need to insert using loop just use insert_batch function provided by Codeigniter.
Example :

$data = array(
   array(
      'title' => 'Title 1' ,
      'name' => 'Name 1' ,
      'date' => 'date('Y-m-d H:i:s)'
   ),
   array(
      'title' => 'Title 2' ,
      'name' => 'Name 2' ,
      'date' => 'date('Y-m-d H:i:s)'
   )
);

$this->db->insert_batch('your_table_name', $data);

This will reduce memory and execution time.