Jump to content

Can I Do This?


TKW22
 Share

Recommended Posts

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

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 this
logo------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

yes.say it dose this
logo------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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...