PHP Classes

File: ex1.php

Recommend this page to a friend!
  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: 12 years ago
Size: 347 bytes


Class file image Download


$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);