kirkdickinson Posted February 5, 2022 Author Share Posted February 5, 2022 2 minutes ago, ginerjm said: When you say 'index file' what do you mean? Are you saying that you are not using any script and letting your system just use the default home page name? What shows in the address bar when you do run it? Does it have a .php extension on it or is it an html extension? When you type in the ?con=xxx what is immediately in front of that? Show us that whole address bar line. The site defaults to the index.php as the first page when you get there. The site is completely working now with the old code with the added "full opening tag" Different pages would be called like this: http://bbc-kjv.com/?con=about http://bbc-kjv.com/?con=our_faith http://bbc-kjv.com/?con=online_sermons Quote Link to comment Share on other sites More sharing options...
ginerjm Posted February 5, 2022 Share Posted February 5, 2022 Ok - index.php is a good thing. So now show us more of your code. Hard to debug something when we aren't seeing it all Unless it is hundreds of lines in which case you have some work to do. Try adding my echo line to the very beginning of any php code in that file and be sure to move the 2 error checking lines up to the start of the php code as well. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted February 5, 2022 Share Posted February 5, 2022 Ok - then that was what was pointed out earlier. Good luck. 1 Quote Link to comment Share on other sites More sharing options...
kirkdickinson Posted February 5, 2022 Author Share Posted February 5, 2022 1 minute ago, ginerjm said: Ok - index.php is a good thing. So now show us more of your code. Hard to debug something when we aren't seeing it all Unless it is hundreds of lines in which case you have some work to do. Try adding my echo line to the very beginning of any php code in that file and be sure to move the 2 error checking lines up to the start of the php code as well. I posted the entirety of my code. The index.php page is this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Bible Baptist Church - Byesville Ohio</title> <!--[if IE 5]> <style type="text/css"> /* place css box model fixes for IE 5* in this conditional comment */ .twoColFixLtHdr #sidebar1 { width: 230px; } </style> <![endif]--><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColFixLtHdr #sidebar1 { padding-top: 30px; } .twoColFixLtHdr #mainContent { zoom: 1; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <link href="bbc.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF" class="twoColFixLtHdr"> <div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v6.0"></script> <div id="container"> <div id="header"> <?php include ("header.php");?> </div> <div id="sidebar1"> <?php include ("menu.php");?> <p> </p> <p><a href="https://www.facebook.com/pages/Bible-Baptist-Church-of-Byesville-OH/153672901470035?ref=br_tf"><img src="Images/facebook-logo.png" align="center" width="120" height="43" alt="Visit Us On Facebook"/></a></p> <p> </p> <p><a href="https://www.youtube.com/channel/UCe-3wTp8RuIFRY_XfLHIRZg"><img src="Images/youtube-logo.png" align="center" width="120" height="58" alt="Watch Us On YouTube"/></a></p> <!-- end #sidebar1 --> </div> <div id="mainContent"> <?php $ext = ".php"; $id = $_GET['con'].$ext; if (file_exists($id)) { include($id); } else { include("main.php"); } ?> <!-- end #mainContent --></div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" /> <div id="footer"> <p>If my people, which are called by my name, shall humble themselves, and pray, and seek my face, and turn from their wicked ways; then will I hear from heaven, and will forgive their sin, and will heal their land.</p> <p align="right">II Chr 7:14 </p> <!-- end #footer --></div> <!-- end #container --></div> </body> </html> Really not much there. Quote Link to comment Share on other sites More sharing options...
kirkdickinson Posted February 5, 2022 Author Share Posted February 5, 2022 6 minutes ago, ginerjm said: Ok - then that was what was pointed out earlier. Good luck. OK, thanks a lot for everything. I added the error reporting and the echo. It seems to be working. Sorry to be so ignorant. Have a great weekend. Stay warm. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted February 6, 2022 Share Posted February 6, 2022 Thank you for giving me credit for your solution but MacGyver actually mentioned it before me as I said earlier. HTH though! Quote Link to comment Share on other sites More sharing options...
kicken Posted February 7, 2022 Share Posted February 7, 2022 (edited) @kirkdickinsonIf you haven't noticed it yet, there is a warning that shows on your main page when the variable is not set: Warning: Undefined array key "con" in xxx/index.php on line 45 If you want to fix this, change this line in your page: $id = $_GET['con'].$ext; To this: $id = ($_GET['con']??'main').$ext; Edited February 7, 2022 by kicken 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.