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 php tutorial on WordPress.com
categories
Calendar
July 2017
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Follow me on Twitter
Blog Stats
  • 74,622 hits