Jump to content

Jodha

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by Jodha

  1. Basically: table layout in index.php |--------------------------------------------------------| |include(header.html); | |--------------------------------------------------------| | | | |include(navigation.html); |include(body.html) | | | | |--------------------------------------------------------| |include(footer.html); | |--------------------------------------------------------| header.html = header content navigation.html = Menu script body.html = content as per menu selection header.html = footer content navigation.html = html and css script currently containing standard <a href="something.html">text</a> Its making the "<a href="something.html">" aspect equate to assigning a PHP variable which changes what is displayed in the "include(body.html);" aspect for the different pieces of content. Does that help a little more?
  2. Well, in the header and footer row of the table in index.php I am using: include(header.html); or include(footer.html); (eventually these are going to be .php or .inc files, I am just trying to get the navigation working at the moment so I am not doing anything too extensive here - very simple template building!) In the right column of the middle row (Body) I provisionally want to use the statement: include($navigation_variable); Although I suspect I will need to use "$navigation_variable" to create a new string which equates to a file name and path, something like: $display = *the file path* $navigation_variable *the file extension* Thus in the Body I will probably be using include($display); This website project will contain about 50 content pages, but these can be broken into 4 template which I can code to show relevant content, as per $navigation_variable referenced against the database. Does this help? I'm off for a ciggie in the garden, back shortly.
  3. Hi All, Got a little question, new to this PHP but rather enjoying it. My books dont seem to cover this however. Gist - I am building an "index.php" It contains a table with three rows and two columns. top row = header middle row, left column = navigation middle row, right column = content (as per navigation) bottom row = footer I have a whole host of HTML based navigation scripts from previous HTML based projects, I would like to use these along side my growing knowledge of PHP. In my current situation I am building a site for a friend, and he 'wants' a particular HTML/JS based menu (cos he likes the way it looks)... I cannot code the same thing in PHP without spending more time than I have to learn PHP at a deeper level (something for after this project). - Back to the subject: The content of the middle row, right column should be include($navigation_variable); $navigation_variable is ultimately a file similar to the header and footer files I am already including in the displayed table in the index.php. However, I am competent enough in other PHP areas to have this pull info from a MySQL database (already got catalog type apps working from learning about the code). When it comes to assigning different values to the $navigation_variable in the <a href....>text</a> HTML tags I have in my navigation script I am having problems In the statement "<a href=....>text</a>" how would I assign a different PHP value to the "href=" section? With this knowledge I believe in the "middle row, right column" I can then use "include($navigation_variable);" (formatting this so it becomes a file name) to display different content, as per clicked links on the navigation script. I think I am looking for something like: <a href=$navigation_variable>text</a> Currently I am getting an "Object not found" message from my navigation selections. Any help muchly appreciated
×
×
  • 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.