I'm trying to extract a string field, under a column called "whenadded", of a mysql table (called "values") with a php script. I'm using this code:
<?php
include("common.php");
$link=dbConnect();
$name = safe($_POST['name']);
$mysqldate = mysql_query("SELECT `whenadded` FROM `values` WHERE `name`= `$name`");
?>
In this table I have only two columns: name and whenadded. Both are strings. If I try to display the result of $mysqldate, I don't see anything (white field).
[SOLVED] At the end I solved using this:
include("common.php");
$link=dbConnect();
$name = safe($_POST['name']);
$query = mysql_query("SELECT * FROM $dbName . `valorigps` WHERE name = '$name'");
while($row = mysql_fetch_array($query))
{
echo $row['whenadded'];
}