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
March 2017
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  
Follow me on Twitter
Blog Stats
  • 72,827 hits