Somewhere in the html form you simply missed the opening quote of input name attribute(s). Example <input type=”text” name=last_name“> Just find and use the right syntax for happy coding. You can find the code for tracking disallowed characters are in system/core/input.php file function _clean_input_keys($string) { if (! preg_match(“/^[a-z0-9:_/-]+$/i”, $string)) { exit(‘Disallowed Key Characters.+’. $string)); } return…
Author: smarttips
Global Ajax Event Handlers
These following Global Ajax Events to be called at the time of initialization ,completion,success,send..etc. These type of events are triggered on each Ajax request, if the global property in jQuery.ajaxSetup() is true . ajaxComplete():This global event to be triggered when Ajax requests complete. .ajaxError(): This global event to be triggered when Ajax requests complete with…
Google Map does not center even after resize
You can solve google map re-size problem by triggering following event lastMapCenter=map.getCenter(); google.maps.event.trigger(map, ‘resize’); map.setCenter(lastMapCenter);
Advanced method to check the mime type of file in php
Usually code is if ($_FILES[‘input_field_name’][‘type’] == ‘image/jpeg’) { //some code } but it is not fully validating the file types(mime). The following code will output the correct file type and avoids the security vulnerabilities of php. $phpfileInfo = new finfo(FILEINFO_MIME_TYPE); $PhpfileContents = file_get_contents($_FILES[‘name_of_input_field’][‘tmp_name’]); $MimeFileType = $phpfileInfo->buffer(PhpfileContents);
csrf exception url codeigniter
Add the following line to application/config/config.php file. $config[‘csrf_exclude_uris’] = array(‘controller 1′,’controller 2′,’controller3/method 1′,’controller3/method 2’); system/core/Security.php Modify the public function csrf_verify() function in Security.php public function csrf_verify() { // If it’s not a POST request we will set the CSRF cookie if (strtoupper($_SERVER[‘REQUEST_METHOD’]) !== ‘POST’) { return $this->csrf_set_cookie(); } // this IF statement is the…