PHP Classes

File: ex2.php

Recommend this page to a friend!
  Classes of Marcos Bezerra   Web Open Patch   ex2.php   Download  
File: ex2.php
Role: Example script
Content type: text/plain
Description: Example #2: Anti-SQL Injection Alternative
Class: Web Open Patch
Filter values to prevent security exploits
Author: By
Last change:
Date: 14 years ago
Size: 320 bytes
 

Contents

Class file image Download
<?php

include_once("WebOpenPatch.php");

$wop = new WebOpenPatch();

$usuario = $_POST['usuario'];
$senha = $_POST['senha'];

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

?>