Login   Register  
PHP Classes
elePHPant
Icontem

File: ex1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marcos Bezerra  >  Web Open Patch  >  ex1.php  >  Download  
File: ex1.php
Role: Example script
Content type: text/plain
Description: Example #1: Anti-SQL Injection
Class: Web Open Patch
Filter values to prevent security exploits
Author: By
Last change:
Date: 2010-01-12 11:58
Size: 347 bytes
 

Contents

Class file image Download
<?php

include_once("WebOpenPatch.php");

$wop = new WebOpenPatch();

$usuario $wop->wopAntiSqlInjection($_POST['usuario']);
$senha   $wop->wopAntiSqlInjection($_POST['senha']);

$sql   "SELECT * FROM usuarios WHERE usuario='{$usuario}' AND senha='{$senha}'";
$query mysql_query($sql);
$list  mysql_fetch_object($query);

?>