28.10.2014 Views

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SQL Injection Attacks and Defense - 2009

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

16 Chapter 1 • What Is <strong>SQL</strong> <strong>Injection</strong>?<br />

// execute sql statement<br />

$result = mysql_query($<strong>SQL</strong>);<br />

// check to see how many rows were returned from the database<br />

$rowcount = mysql_num_rows($result);<br />

// iterate through the record set returned<br />

$row = 1;<br />

while ($db_field = mysql_fetch_assoc($result)) {<br />

if ($row

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!