<?php
if (!isset($_POST['submitted'])) {//1
// Checs for the ID
if (isset($_GET['id']) && is_numeric($_GET['id'])) {//2
// MySQL Connect
require_once('mysql_connect.php');
$id = mysql_real_escape_string($_GET['id']);
$query = "SELECT id, name FROM websites WHERE id = $id";
$result = mysql_query($query) OR die (mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
?>
// ROW WITH THE ERROR
<?php echo $row['name']; ?></strong><br /><?php echo $row['banner']; ?><? echo $row['description'];?>
<?php
} else {
echo '<font color="red">You have to select a server to view</font>';
die();
}
} else {
// MySQL Connect
require_once('mysql_connect.php');
$id = mysql_real_escape_string($_POST['id']);
// Choose the web for votes
$query = "SELECT id, votes FROM websites WHERE id = $id";
$result = mysql_query($query) OR die(mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$votes = $row['votes'];
$url = $row['url'];
$id = $row['id'];
$banner = $row['banner'];
$result = mysql_query($query) OR die(mysql_error());
} // end
?>
All that is printing is the Name, the rest is not being printed.
I'm just wondering where i'm going wrong?
Its supposed to print the Name, Banner, and description from $id
.