Jump to content

story97

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

story97's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 1. it's completely irrelevant what's inside those files. it makes absolutely no difference. 2. i'm too thick, don't worry about it. i'll find the answer.
  2. again, the only thing I can figure is I'm not explaining this right. instead of having 10 files each named differently with a different second include, i need to write a statement that will change the name of the second include based on what is on the URL since I know I can establish varibales using the URL string with ? & and =
  3. I've done it three times. the ENTIRE contents of the page is <?php include("header.php"); include("content-lessons.html"); include("footer.php"); ?>
  4. No, i don't. all of the code for the site is in those includes. the only thing I'm trying to accompish is to use a url string to change the name of the include but I don't know how to construct it.
  5. maybe I'm not explaining this right. i don't know. anyone else that reads this, all i'm trying to do is set a variable so the end of the URL string defines the second include. so file.php?lesson1 would create an include for the file named lesson1. I don't know exactly what I'm not explaining right
  6. I'm not sure what you aren't undersdtanding. i put that in a blank PHP file and uploaded it the example I showed you in the first post is all the existing page is. a single file with 3 includes that bring in a header, body and footer
  7. I did, i wrapped it in php and followed the url Some of the things didn't make sense to me. i thought this would just require an if statement and a _GET to see what i put after the URL, and include the corresponding file. so if the URL ended ?lessonq1 then the second include would bring in the file named lesson1, which is an html template <?php if (isset($_GET['file']) && $_GET['file']<>'') { $file = strtolower($_GET['file']); if (array_key_exists($file,$files_ar)) $include_name = $files_ar[$file]; else die("Invalid url value"); include('header.php'); include($include_name); include('footer.php'); exit(); } else die("Missing url value") exit(); ?>
  8. Actually i thought taht WAS the entire code. so wrap in php and go? then the call would be site/index.php?lesson1 just so you know, i know absolutely nothing about writing php. I can recognize things, but i am not a developer. i thought you meant to construct it just like that
  9. hmm Well, i tried that code and get no return. empty page not sure why. I also get no return in the console which is how i debug jquery, and see nothing in the php error logs. course, this isn't javascript so I can't really debug with firebug
  10. See if I can explain this right. I am currently using static files for a very basic set of pages. Right now i have a main file that has three includes. a header include, body and footer. Due to needing to add pages, i don't want to keep adding more and more files. instead I want to use php to change one of the includes based on the url. so thissite.com/index.php?lesson1 would change this <?php include("header.php"); ?> <?php include("content-lessons.html"); ?> <?php include("footer.php"); ?> to this <?php include("header.php"); ?> <?php include("lesson1.html"); ?> <?php include("footer.php"); ?> or whichever way would be the best way to set the second include. my guess was that if the second line had something like this? if(isset($_GET['lesson1'])){ include('include/in-'.$_GET['lesson1.html'] can someone give me a starting place here? i am pretty sure i can pick ti up if someone gets me going in the right direction. thanks a ton.
  11. Nevermind I copied and pasted the code to my PDA then to the site. This is exactly what I wanted. Thank you so much!
  12. Wow fantastic. I'm remote right now But I'll give this a shot in a  couple hours. I REALLY appreciate it.
  13. Hello, I'm a designer, not a coder, but I'm in need of a little help. The site i'm working on now has a flash header and menu. This can be a problem for people with Active-X turned off. So I want to offer an option. Load the site using the flash. Right under the menu, have a link "Non flash site". Now, by itself this might be simple. but again, i'm not a programmer. I'd like this setting stored in a persistent cookie so the user only has to see things they don't want to once. Is this too broad of a question?
×
×
  • 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.