check out the CSRF implementation in codeigniter from net.tutsplus.com.
I hope this solves your problem. if you implemented correctly, than write this inside, you will be config.php
if (isset($_SERVER["REQUEST_URI"])) { if(stripos($_SERVER["REQUEST_URI"],'/mypage') === FALSE) { $config['csrf_protection'] = TRUE; } else { $config['csrf_protection'] = FALSE; } } else { $config['csrf_protection'] = TRUE; }
source share