How to prevent SQL Injection (WHERE clause)?

Asked

Viewed 16 times

0

How can I prevent SQL Injection in this case?

<?php

//==== GET URL PARAMETER
$urlParam =  $_GET['u'];
    
$sql = "SELECT email FROM `users` WHERE keystring = '$urlParam'";
$result = mysqli_query($conn, $sql);
    
$row = mysqli_fetch_array($result);
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.