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

?>

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