idalatob
01-10-2008, 09:23 AM
I have a suspicion that it is a server problem... But can you guys detect a problem with this code that would cause it to randomly sometimes not load?
<?php
include("this_file.php");
$page_id = intval($_GET['pid']);
if (!$page_id){
$page_id = 1;
}
$page_details = mysql_fetch_assoc(mysql_query("SELECT * FROM `site_pages` WHERE `page_id`='$page_id'"));
$page_name = "www.x.co.za/index.php?pid=" . $page_id;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo($page_details['page_title']); ?></title>
<link rel="stylesheet" href="default.css" type="text/css"/>
<link rel="stylesheet" href="drop-down.css" type="text/css"/>
</head>
<body>
<table width="800" align="center" cellspacing="0" cellpadding="0" style="background-color:white;">
<!--include in header-->
<?php include("includes/header.php"); ?>
<!--end of header-->
<tr><td colspan="2" class="c_blue" height="5"></td></tr>
<tr><td colspan="2" height="30" id="gray_bar">
<?php include("includes/subpagelinks.php"); ?>
</td></tr>
<tr><td colspan="2">
<table width="800" align="center" cellspacing="0" cellpadding="0"><tr>
<td width="160" class="c_grey" height="420" valign="top">
<!--Include in links-->
<?php include("includes/links.php"); ?>
</td>
<td width="5" class="c_orange"></td>
<td width="635" id="right_content" valign="top">
<div id="page_header_bar"><?php echo($page_details['page_title']); ?></div>
<div id="content_container">
<?php echo($page_details['page_content']); ?>
</div>
<div style="text-align:right; padding-right:5px; padding-bottom:5px;"><a style="font-size:14px;" href="mailto:blank?Subject=Interesting Website:www.x.co.za&Body=Hi I found this really interesting website <?php echo($page_name); ?>" >Tell a friend</a></div>
</td></tr>
<tr>
<td width="160" class="c_grey"></td>
<td width="5" class="c_orange"></td>
<td class="c_blue" style="text-align:center; color:white;">Contacts: John W Frith CA(SA), PO Box 2440, Port Alfred, 6170<br>
Tel: 046 624 9000, Fax: 086 668 3374, Cell: 083 378 3374, email: <a style="text-decoration:none; color:white; font-weight:bold;" href="mailto:john@yfcwill.co.za">john@yfcwill.co.za</a></td>
</table>
</td></tr>
</table>
</body>
</html>
I didnt write the code... and I know its a bit sloppy. but still what is giving this error....
<?php
include("this_file.php");
$page_id = intval($_GET['pid']);
if (!$page_id){
$page_id = 1;
}
$page_details = mysql_fetch_assoc(mysql_query("SELECT * FROM `site_pages` WHERE `page_id`='$page_id'"));
$page_name = "www.x.co.za/index.php?pid=" . $page_id;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?php echo($page_details['page_title']); ?></title>
<link rel="stylesheet" href="default.css" type="text/css"/>
<link rel="stylesheet" href="drop-down.css" type="text/css"/>
</head>
<body>
<table width="800" align="center" cellspacing="0" cellpadding="0" style="background-color:white;">
<!--include in header-->
<?php include("includes/header.php"); ?>
<!--end of header-->
<tr><td colspan="2" class="c_blue" height="5"></td></tr>
<tr><td colspan="2" height="30" id="gray_bar">
<?php include("includes/subpagelinks.php"); ?>
</td></tr>
<tr><td colspan="2">
<table width="800" align="center" cellspacing="0" cellpadding="0"><tr>
<td width="160" class="c_grey" height="420" valign="top">
<!--Include in links-->
<?php include("includes/links.php"); ?>
</td>
<td width="5" class="c_orange"></td>
<td width="635" id="right_content" valign="top">
<div id="page_header_bar"><?php echo($page_details['page_title']); ?></div>
<div id="content_container">
<?php echo($page_details['page_content']); ?>
</div>
<div style="text-align:right; padding-right:5px; padding-bottom:5px;"><a style="font-size:14px;" href="mailto:blank?Subject=Interesting Website:www.x.co.za&Body=Hi I found this really interesting website <?php echo($page_name); ?>" >Tell a friend</a></div>
</td></tr>
<tr>
<td width="160" class="c_grey"></td>
<td width="5" class="c_orange"></td>
<td class="c_blue" style="text-align:center; color:white;">Contacts: John W Frith CA(SA), PO Box 2440, Port Alfred, 6170<br>
Tel: 046 624 9000, Fax: 086 668 3374, Cell: 083 378 3374, email: <a style="text-decoration:none; color:white; font-weight:bold;" href="mailto:john@yfcwill.co.za">john@yfcwill.co.za</a></td>
</table>
</td></tr>
</table>
</body>
</html>
I didnt write the code... and I know its a bit sloppy. but still what is giving this error....