I am working on a project which will be connected to a MySQL database requires the following:
- Registration
- Login/Logged-in/Logout
- Home
- Links
Two items available for those who log in:
- My Bookmarks
- Contact Us
My current site structure is as follows:
*Shortened* URL (project root folder): sois.com/440/finalproject/
- finalproject Folder Contents: htdocs folder | mysql_connect.php
- htdocs Folder Contents: bookmark folder | contact folder | Home folder | includes folder
- bookmark Folder Contents (ALL PHP FILES): add | delete | deleteconfirm | index | search | searchform | update | updateform
- contact Folder Contents: contact.php
- Home Folder Contents (ALL PHP FILES): forgot | index | link | loggedin | login | logout | register
- includes Folder Contents: footer.php | header.php | logo.jpg
This is an image of what you are supposed to see before LOGIN:
The code for /Home/index.php is as follows:
<?php # index.php
session_start();
//check session first
if (!isset($_SESSION['email'])){
include ('header.php');
}else
{
include ('header.php');
}
?>
<h2>Project Description</h2>
<h2>Blah Blah Blah ...</h2>
<h2>put images here if you want ...</h2>
<h2>change background ...</h2>
<h2>modify the site as you want ...</h2>
<?php
include ('footer.php');
?>
My question is fairly simply, I receive the errors:
- "Warning: include(kethcart.uwmsois.com/public_html/440/finalproject/htdocs/includes/header.php): failed to open stream: No such file or directory in /home/kethcart/public_html/440/finalproject/htdocs/home/index.php on line 5"
- "Warning: include(): Failed opening 'kethcart.uwmsois.com/public_html/440/finalproject/htdocs/includes/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kethcart/public_html/440/finalproject/htdocs/home/index.php on line 5"
- "Warning: include(kethcart.uwmsois.com/public_html/440/finalproject/htdocs/includes/footer.php): failed to open stream: No such file or directory in /home/kethcart/public_html/440/finalproject/htdocs/home/index.php on line 19"
- "Warning: include(): Failed opening 'kethcart.uwmsois.com/public_html/440/finalproject/htdocs/includes/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kethcart/public_html/440/finalproject/htdocs/home/index.php on line 19"
Question: How can I properly link the file locations of header.php and footer.php (located in the include folder) so that my index.php (located in the Home folder) properly displays, like the above image?
While I know there are other posts floating around StackOverflow, I failed to locate one which I fully understood and could apply to my situation. I apologize if my question seems elementary but I fully appreciate any and all help!
Thanks everyone, if you have any further questions or need more details, let me know.