Hey guys, I've been scouring the forums as well as the web looking for some help with my website. I've been using blog programs such as Wordpress, etc. in the past but am getting tired of not having control over how everything works.
What I'd like to do is have an index.php page that contains all the basic stuff, like the navigation at the top, yadda yadda, but then in the main DIV calls another PHP page. Allow me to explain...
Lets say I have a new post. I'll put it in a file called post38.php, with the title in <posttitle></posttitle> tags and the main stuff in like <postbody></postbody> tags. What I would like to do is update (manually) the index.php file to somehow call the post38.php file so that it echos, returns, whatever, all of its contents to be displayed as HTML in index.php.
So...
<html>
<? get(post38.php)
?>
</html>
Would somehow result in...
<html>
<posttitle>My Dog Jack</posttitle>
<postbody>He's great, but a bit too furry for my liking.</postbody>
</html>
Is there any way to do this? I understand PHP to the point where in the links section on the side I'll be able to use some directory functions and if/else loops to display links to like the latest 5 posts, but I can't figure out how to have one PHP file open the contents of another PHP file. Any ideas would be really appreciated! (Hope it all makes sense too.)
What I'd like to do is have an index.php page that contains all the basic stuff, like the navigation at the top, yadda yadda, but then in the main DIV calls another PHP page. Allow me to explain...
Lets say I have a new post. I'll put it in a file called post38.php, with the title in <posttitle></posttitle> tags and the main stuff in like <postbody></postbody> tags. What I would like to do is update (manually) the index.php file to somehow call the post38.php file so that it echos, returns, whatever, all of its contents to be displayed as HTML in index.php.
So...
<html>
<? get(post38.php)
?>
</html>
Would somehow result in...
<html>
<posttitle>My Dog Jack</posttitle>
<postbody>He's great, but a bit too furry for my liking.</postbody>
</html>
Is there any way to do this? I understand PHP to the point where in the links section on the side I'll be able to use some directory functions and if/else loops to display links to like the latest 5 posts, but I can't figure out how to have one PHP file open the contents of another PHP file. Any ideas would be really appreciated! (Hope it all makes sense too.)