itswsi Posted June 13, 2008 Share Posted June 13, 2008 Hi, i am hoping someone can help me out with this problem i am having with one of my pages. Situation is that i have a php page (see full coding below) but the issue is that it doesn't display anything in the browser. Here is the full code: ------------------------------ <html> <head> <title><?= $strTitleTag ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" src="./js/default.js" type="text/javascript"></script> <link href="css/default.css" rel="stylesheet" type="text/css"> <meta name="description" content="We offer some of the most beautiful diamond jewellery and diamond rings available online today. As well as a selection of exclusive designs you can also create your own engagement ring online."> <meta name="keywords" content="diamond jewellery, diamond ring, diamond engagement ring, diamond earrings, gold jewellery"> </head> <body<?= $strOnLoad ?>> <table height="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr><td width="10" height="30" background="images/l-bar.gif"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td> <td width="3" rowspan="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td> <td width="778" rowspan="2" valign="top" bgcolor="#FFFFFF"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td height="86" colspan="4" valign="top"><?php require("http://www.mysite.com/include/header.php"); ?></td> </tr> <tr> <td height="2" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td width="129" height="100%" rowspan="15" valign="top" bgcolor="#A9CEEB"><table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><?php require("http://www.mysite.com/include/side-nav-3.php"); ?></td> </tr> <tr> <td height="100%"> </td> </tr> <tr> <td width="129" height="154" valign="bottom"><img src="images/spacer.gif" width="1" height="1"> <table width="129" height="154" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="images/diamond.jpg"> </td> </tr> </table></td> </tr> </table></td> <td rowspan="15"> </td> <td width="646" colspan="2" valign="top" height="128"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="5"><img src="images/spacer.gif" width="3" height="1"></td> <td><div align="right"> <script language="JavaScript" src="js/flash-mini-1.js" type="text/javascript"></script> </div></td> </tr> </table></td> </tr> <tr> <td colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="414" valign="bottom"><table border="0" cellspacing="0" cellpadding="2"> <tr> <td><br> <img src="/images/product_cat/header/<?= $strHeader ?>.gif" alt="Buy Diamonds"></td> </tr> </table></td> <td align="right" valign="middle"> <? if(($intItem <= 0)&&($intShowFilter == 1)){ ?> <table> <form action="buy-diamonds.php" method="get"> <?php foreach($HTTP_GET_VARS as $strKey=>$strValue){ if($strValue != ""){ if(($strKey != "orderby")&&($strKey != "p-metal-material")){ $strValue = preg_replace("/<|>/","",$strValue); echo "<input type=\"hidden\" name=\"$strKey\" value=\"$strValue\">\r\n"; } } } if($HTTP_GET_VARS[orderby] == "price-asc"){ $strSelected1 = " SELECTED"; } elseif($HTTP_GET_VARS[orderby] == "price-desc"){ $strSelected2 = " SELECTED"; } ?> <td> <select name="orderby" class="inputbox" style="width:110px"> <option value="">Order by Price ></option> <option value="price-asc"<?= $strSelected1 ?>>Lowest-Highest</option> <option value="price-desc"<?= $strSelected2 ?>>Highest-Lowest</option> </select> </td><td> <!--<select name="p-metal-material" class="inputbox" style="width:120px"> <option value="">Choose the Metal ></option> <?php $strDQuery = "SELECT product_metal_id, product_metal_name FROM product_metal WHERE 1 ORDER BY product_metal_name"; $dResult = mysql_query($strDQuery); while($dRow = mysql_fetch_array($dResult)){ if($HTTP_GET_VARS['p-metal-material'] == $dRow[product_metal_id]){ $strSelected = " SELECTED"; } else{ $strSelected = ""; } echo "<option value=\"$dRow[product_metal_id]\"$strSelected>$dRow[product_metal_name]</option>\r\n"; } ?> </select>--> </td> <? if($intCat == 1){ ?> <td> <select name="p-name" class="inputbox" style="width:110px"> <option value="">Diamond Shape ></option> <?php $strDQuery = "SELECT product_shape_name FROM product_shape WHERE 1"; $dResult = mysql_query($strDQuery); while($dRow = mysql_fetch_array($dResult)){ if($HTTP_GET_VARS['p-name'] == $dRow[product_shape_name]){ $strSelected = " SELECTED"; } else{ $strSelected = ""; } echo "<option value=\"$dRow[product_shape_name]\"$strSelected>$dRow[product_shape_name]</option>\r\n"; } ?> </select> </td> <? if($intSubCat == 2){ ?> <td> <select name="p-carat" class="inputbox" style="width:90px;"> <option value="">Carat Wt ></option> <?php $arrCaratF = array( "0.01,0.25", "0.26,0.50", "0.51,0.75", "0.76,1.00", "1.01,1.50", "1.51,99", ); foreach($arrCaratF as $strCaratF){ echo "<option value=\"$strCaratF\""; if($_GET['p-carat'] == $strCaratF){ echo " SELECTED"; } echo ">".str_replace("-99ct","ct+",str_replace(",","-",$strCaratF."ct"))."</option>\r\n"; } ?> </select> </td> <? } } ?> <input type="hidden" name="psub" value="y"> <td><input type="submit" value="Go" class="submitbox2"></td> </form> </table> <? } ?> </td> </tr> </table></td> </tr> <tr> <td height="7" colspan="2" valign="top" bgcolor="#DDECF7"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="3" colspan="2" valign="top" bgcolor="#CCCCCC"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="20" colspan="2" background="images/m-bar2.jpg"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td colspan="2" valign="top" height="600"> <table cellspacing="0" cellpadding="5" border="0" width="100%"> <tr><td> <?php if($intWishList == 1){ echo "<p><b class=\"dprice_s\"> You are currently viewing $strWLName"."'s wishlist</b></p>"; } ?> <?= $strContent ?> </td></tr> </table> </td> </tr> <tr> <td height="1" colspan="2"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td colspan="2"><?php require("include/mid-nav.php"); ?></td> </tr> <tr> <td height="20" colspan="2" background="images/m-bar.jpg"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="2" colspan="2"> </td> </tr> <tr> <td width="195"><?php require("include/logos.php"); ?></td> <td align="right"><?php require("include/login-2.php"); ?></td> </tr> <tr> <td colspan="2"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="2" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="33" colspan="4" valign="top" background="images/b-bar.gif"><img src="images/spacer.gif" width="1" height="1"> <?php require("include/footer.php"); ?></td> </tr> </table></td> <td width="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td> <td width="10" height="30" background="images/r-bar.gif"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td> </tr> </table> <!-- Start of Site Stats Code --> <script language="JavaScript" src="http://db7.net-filter.com/script/37695.js"> </script> <noscript> <img src="http://db7.net-filter.com/db.php?id=37695&page=unknown"> </noscript> <!-- End of Site Stats Code --> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-885802-1"; urchinTracker(); </script> </body> </html> -------------------------------- From my whole site, only this page does not display, the other pages work fine. When i check the view source coding from the browser all i see is the following: --------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY> <META content=MUTGPNKPWO name=SKYPE_FRAMEID></HTML> --------------------------------- Could someone please go through the code and see what is wrong, is there something missing or coded wrong? Or could it be another file that is wrong (although if the other pages of my site are fine, then i guess it isn't. Note: i have changed the name of my website for the timebeing as i don't wish to display the real url. Any urgent help and advice would be greatly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
conker87 Posted June 13, 2008 Share Posted June 13, 2008 It doesn't look like your page is uploading correctly, since none of the outputted code is equivalent to your posted code. Quote Link to comment Share on other sites More sharing options...
itswsi Posted June 13, 2008 Author Share Posted June 13, 2008 thanks for the quick reply conker87, much appreciated. I don't quite understand what you mean by not uploaded correctly. The page code i have provided has been copied from the specific page from my ftp access so that must show the page coding is on the server. But the view source does not display anything and the page is just black. No of the basic html meta tags are even shown. I am struggling to find out what the problem is. I have contacted my hosts and they tell me the page coding is there (but since they are probably a rubbish hosting provider, they are unable to help me with the coding). I also have another question, based on just the coding displayed, this was done by another developer, is the coding done right (e.g. php syntax, rules and conventions). Silly question i know as the page don't work but i would like to know if thats how php should be coded. Thanks again Quote Link to comment Share on other sites More sharing options...
itswsi Posted June 13, 2008 Author Share Posted June 13, 2008 another update, i have spoken to a friend of mine who tell me the following code (in bold) is the reason for the error: $arrClarity = array( "", "I", "SI", "VS", "VVS", <!--"IF"--> Could someone please explain why this is the reason as i thought the <!-- tags are normally just comments that remain hidden from the coding. Thanks Quote Link to comment Share on other sites More sharing options...
Vizor Posted June 13, 2008 Share Posted June 13, 2008 <!-- blah --> comments things in HTML not PHP. To comment in php you can use // or # for a line comment or /* lots of lines */ for a block of code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.