Skip to content

Instantly share code, notes, and snippets.

@ckdarby
Created June 5, 2012 23:33
Show Gist options
  • Save ckdarby/2878803 to your computer and use it in GitHub Desktop.
Save ckdarby/2878803 to your computer and use it in GitHub Desktop.
Example that bcit-ci/CodeIgniter#1291 has been fixed
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* application/config/config.php
*
*/
//These are the only options in refernece to this issue
$config['base_url'] = '';
$config['csrf_protection'] = TRUE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
<?php
/**
* application/views/welcome_message.php
*
*/
?>
<div id="container">
<?php
echo form_open('/');
$data = array(
'name' => 'username',
'id' => 'username',
'value' => 'johndoe',
'maxlength' => '100',
'size' => '50',
'style' => 'width:50%',
);
echo form_input($data);
echo form_submit();
echo form_close();
?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment