Forum Moderators: coopster
After reading dozens of postings and tutorials and not finding an answer, I'm hoping someone has a suggestion. The first file is browse.php and displays the right data without a problem:
$query = "SELECT * FROM table_name WHERE field_name='xyz'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "{$row['id']} " .
"<a href=\"view_record.php?id={$row['id']}\">{$row['description1']} ";
}
The id is passed to view_record.php:
if (isset($_GET['id'])) {
$id = (int) $_GET['id'];
}
require_once ('config.inc');
$query = "SELECT id, description2 FROM table_name WHERE field_name='xyz'";
$result = mysql_query($query);
if (mysql_num_rows($result) == 1)
{
$row = mysql_fetch_array($result, MYSQL_ASSOC);
echo "ID: {$row['id']} " .
"Description: {$row['description2']} ";
}
This page is blank. Any ideas?
>> This page is blank. Any ideas?
A blank page either means nothing is being echoed to the browser OR you are having a fatal error of doom and you need to check your error logs to see if something's up. Let's assume the latter and see what's in those logs.