TKW22 Posted March 24, 2009 Share Posted March 24, 2009 can i make a code that does this?I want to make a code that you can make new pages with a template but I cant seem to find out how to upload it from that page or how to use forums to put stuff in the tamplate to upload it.an is it possible to save the page in the data base and than send it out to a page?something like a forum or a blog.{sorry for grammar and spelling.} Link to comment Share on other sites More sharing options...
jarrett000 Posted March 24, 2009 Share Posted March 24, 2009 Let me see if I understand the question properly, do you want to have a page where the template does not change, only the information within it? If so you'll need PHP. Link to comment Share on other sites More sharing options...
TKW22 Posted March 24, 2009 Author Share Posted March 24, 2009 Let me see if I understand the question properly, do you want to have a page where the template does not change, only the information within it? If so you'll need PHP.yes.say it dose thislogo------content---------copyright i want it to change the content to somthing i put in like logo-----hi------copyright then save it to a file or data base.then if saved to data base go to a page to see it say a url like this { http://somedomain.com/somthing.php?page=1 }and if possible a preview made after you hit preview button Link to comment Share on other sites More sharing options...
ckrudelux Posted March 25, 2009 Share Posted March 25, 2009 yes.say it dose thislogo------content---------copyright i want it to change the content to somthing i put in like logo-----hi------copyright then save it to a file or data base.then if saved to data base go to a page to see it say a url like this { http://somedomain.com/somthing.php?page=1 }and if possible a preview made after you hit preview button I'm not sure why you want to save it to a file?but here is a way of doing what you want.logo------<?php// if "?page" is after the address "localhost/index.php?page"if(isset($_GET['page'])){ //this will be a value like this page1.php and your address will look like this "localhost/index.php?page=page1" $page = $_GET['page'] . ".php"; // Here it gets page1.php too your index file include '$page';}else {// if you haven't writen any thing more then this "localhost/index.php" you will get to the start page or you could display a message if you want.include 'start.php';}?>---------copyright <a href="index.php?page=page1">Page 1</a> hope this helps in some way Link to comment Share on other sites More sharing options...
TKW22 Posted March 25, 2009 Author Share Posted March 25, 2009 is it possible to save it to the data base like mysql?pulse i wanted it to be an a admin so i could just make a page from the website if possible. Link to comment Share on other sites More sharing options...
jlhaslip Posted March 25, 2009 Share Posted March 25, 2009 Indeed it is possible to use a DB for this. include('header.inc.php');include('article.php'); // use this included file to select the Database content to addinclude('footer.inc.php'); Link to comment Share on other sites More sharing options...
TKW22 Posted March 25, 2009 Author Share Posted March 25, 2009 Indeed it is possible to use a DB for this.include('header.inc.php');include('article.php'); // use this included file to select the Database content to addinclude('footer.inc.php'); thanks ill try later. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.