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: 11 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);

?>

For more information send a message to info at phpclasses dot org.