I have a field in a MySQL database that contains a varchar. This varchar is intended to be a string that will be used to refer to a file location. For example, /file.php
.
I've managed to grab this varchar and store it in a $locationarray
using the code below:
$query4 = mysql_query("select filelocation from users where username='$username' limit 1");
while($rowloc = mysql_fetch_assoc($query4))
{
$locationarray = $rowloc['filelocation'];
}
However, when I use $locationarray
in conjunction with the include()
function, nothing is displayed on screen?
Is there a way to get data from a MySQL database that can be used with include()
?