page not displaying anything
Posted: Sun Feb 01, 2004 7:38 am
this is a link from anoter page it was not working with a http error which i fixed i changed my web server to apache and set it up manually for windows (FUN!). but now nothing is displayed when the page is loaded can any one help.. the code is below
<?php
// Include the error management
require_once ('4dm1n/config.inc');
require_once ('../mysql_connect.php'); // Connect to the database.
if (is_numeric ($_GET['pid'])) {
$query ="SELECT * FROM meal ={$_GET['pid']}";
$result = mysql_query ($query);
$row = mysql_fetch_array ($result, MYSQL_ASSOC);
mysql_close(); // Close the database connection.
// Set the page title and include the HTML header.
$page_title = $row['meal_name'];
include_once ('includes/header.html');
// Display a header.
echo "<div align=\"center\">
<b>{$row['meal_name']}</b> by
<br />{$row['size']}
<br />\${$row['price']}
<a href=\"add_cart.php?pid={$row['meal_id']}\">Add to Cart</a>
</div><br />";
//Get the image information and display the image.
if ($image = @getimagesize ("../uploads/{$row['image_name']}")) {
echo "<div align=\"center\"><img src=\"../uploads/{$row['image_name']}\" $image[3] alt=\"{$row['print_name']}\" />";
} else {
echo "<div align=\"center\">No image available.";
}
echo '<br />' . stripslashes($row['descripiton']) . '</div>';
include_once ('includes/footer.html'); // Require the HTML footer.
}
else { // Redirect
header ("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/index.php");
exit();
}
?>
<?php
// Include the error management
require_once ('4dm1n/config.inc');
require_once ('../mysql_connect.php'); // Connect to the database.
if (is_numeric ($_GET['pid'])) {
$query ="SELECT * FROM meal ={$_GET['pid']}";
$result = mysql_query ($query);
$row = mysql_fetch_array ($result, MYSQL_ASSOC);
mysql_close(); // Close the database connection.
// Set the page title and include the HTML header.
$page_title = $row['meal_name'];
include_once ('includes/header.html');
// Display a header.
echo "<div align=\"center\">
<b>{$row['meal_name']}</b> by
<br />{$row['size']}
<br />\${$row['price']}
<a href=\"add_cart.php?pid={$row['meal_id']}\">Add to Cart</a>
</div><br />";
//Get the image information and display the image.
if ($image = @getimagesize ("../uploads/{$row['image_name']}")) {
echo "<div align=\"center\"><img src=\"../uploads/{$row['image_name']}\" $image[3] alt=\"{$row['print_name']}\" />";
} else {
echo "<div align=\"center\">No image available.";
}
echo '<br />' . stripslashes($row['descripiton']) . '</div>';
include_once ('includes/footer.html'); // Require the HTML footer.
}
else { // Redirect
header ("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/index.php");
exit();
}
?>