Jump to content

Perry|

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Everything posted by Perry|

  1. Where should I start? I don't really like W3Schools, what is an alternative?
  2. The id is referencing the specific guide. Say I have one guide category then the id is pointing to a specific part of the category (On a new page).
  3. I need to learn about MySQL. Just to clear it up, what would I do with the tables? Create a table then add data for each page of content? Or will I need a table for each page of content?
  4. No it's not that's what I'm asking, where should I store the content? In mySQl? In files? Also the Title needs to be dynamic with the content too.
  5. Hello. I am not sure how to store files for my site and then display them. I have installed Smarty on my server for templates. My site is guide based and I want to keep the URL's short and identify them with ?id= (http://www.myurl.com/guide.php?id=1) Those not familiar with Smarty, you create a template (.tpl file) and add areas in the template that you edit in your main file (index.php or whatever) This is what I have in my index.php file currently <?php require 'smartyconfig/libs/Smarty.class.php'; $smarty = new Smarty; $smarty->assign('title','Home'); $smarty->assign('main','THIS IS WHERE MAIN CONTENT WILL GO'); $smarty->display('index.tpl'); ?> So basically anything in 'main' needs to be dynamic. So any ideas on how to achieve this please post them, if you are unsure about anything please ask me! I have subscribed to this topic so I will get back to you within ~20 minutes. Many thanks, Perry
  6. Could you give an example of what you mean?
  7. Thank you for your posts, I'll look into Smarty however I am looking for other alternatives to it.
  8. <?php include('inc/headinc.php'); ?> <title>Home</title> <?php include('inc/leftinc.php'); ?> leftinc.php ends the head tag, sorry for not pointing that out. I was thinking if I store all the data in a database? I'm not sure really.
  9. Thank you, I'll leave this topic unsolved to get some more replies on different ways to do it.
  10. Hello. I need some help with creating a dynamic site with PHP. I'll cut strait to it and say what I need to do. I have made a template with PHP includes; <?php include('inc/headinc.php'); ?> <title>Home</title> <?php include('inc/leftinc.php'); ?> <?php include('inc/rightinc.php'); ?> <div class="maincontent"> </div> <?php include('inc/endinc.php'); ?> headinc.php is all the meta data, attached CSS files, and an attached JS file. leftinc.php is the left part of a table for the main layout. rightinc.php is the right part of a table containing a CSS drop down menu and a banner. endinc.php contains Google analytics code, a footer and closes the body and html tags. The parts that need to be dynamic are the title and the div with the class of maincontent. The mainconent div will hold the data for the page, there will be different type of guides on the site and I want to narrow them down with page Id's for example http://myurl.com/guidetype.php?id=1 etc etc. Also the page title needs to change but if I am using includes to display the data on the page how will I be able to change the title? I think this sounds a bit confusing so please if you do not understand what I mean just ask. Kind Regards, Perry
  11. Hello alvinrow. I only need id's on certain pages, not on the main page. It's all a bit confusing.
  12. Hello. I am making a site template with php includes, however, I have lots of things I need in the template and I do not know how to do them as I am fairly new to PHP. Here is an idea of what I want to the site look like Yellow areas are the template, red areas are the template but are adverts and the blue area is what is dynamic and will be changed on the page type via creating a new php document, copying the template from a text file on the server then including the file with the data in the specific place. So could someone post example code so I can learn off of it or something :-\ In the blue area I will be using include("./s/file".$_GET['id'].".php") Will it work with the template aswell? I am really new to PHP so I need extra help with all of this. Regards, Perry
  13. Hello. Sorry if I didn't explain it enough, What I need is to keep my page urls short as my site is full of guides so I need something like http://www.mydomain.com/guidetype.php?id=1 ( didn't mean to add that .htm thing on the end sorry ) Sorry, but I did not understand the replies that you have given me so could you explain it a bit more so I can fully understand it Sorry if this sounds a bit rude! Thanks, Perry PS. Where is the edit post button on this forum I spent like 5 minutes trying to find it
  14. Hello. I am fairly new to PHP and I am currently starting to learn it. However, I was wondering how to create such a url as the title http://www.url.domain/blah.php?id=3&blah.htm as I am very interested in using it on my website as I am currently rebuilding it to make it more usable and dynamic and would like to implement this into my site. Kind Regards, Perry
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.