I am trying to do a mysql fetch using a variable in my sql query.. Unfortunately I have no idea why the query is not working.
After the $_GET I have the echo to make sure that that was actually working, which it is, but the error seems to be occurring where the actually query is going
<?php
$con=mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$scout_id = $_GET['scout_id'];
echo "scout_id: ".$scout_id;
/*This is where the error is */
$result = mysqli_query($con,"SELECT * FROM scouts WHERE scout_id='$scout_id' ");
$row = mysql_fetch_row($result);
var_dump($row);
?>
If anyone would be able to help I would be most appreciative!