Blog Archives

Points to Remember in Yii


1)Yii application is build using Model-View-Controller(MVC) architecture. 2) Yii implements two kindsĀ of model form model (CFormModel class) and active records(CActiveRecord class),which are extended by same base class cmodel. 3)form model represent the logic for form fields validation and bussiness logic.

Tagged with: , , , , , ,
Posted in php, yii framework

sanitize function to prevent sql injection in php 2014


function input_sanitize_data($post){ $lowerpost = strtolower ($post); $data = str_replace(‘–‘, ”, $post); $data = str_replace(“‘”, ”, $post); $data = str_replace(‘=’, ”, $post); $data = str_replace(‘;’, ”, $post); if (!(strpos($lowerpost, ‘ or ‘)===FALSE)){ return false;} if (!(strpos($lowerpost, ‘table’)===FALSE)){ return false;}return $post; }

Tagged with: , , , , , , , , ,
Posted in php
Follow Tutorial on WordPress.com
categories
Calendar
May 2018
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  
Follow me on Twitter
Blog Stats
  • 78,424 hits