PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 17th, 2002, 05:46 AM
Waxcid Waxcid is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 Waxcid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Newbie question

Hey, I just have a little question for you guys.

Alright I have a little Html/CSS design I made, fairly basic but the thing is if I want to make a change to the layout I don't want to have to actually go back and make the change to all 10-20 or so pages. Can I have a code that'll have the template of the pages and I can change that and from there it'll change it on the rest of the pages?

oh, and on a side note I recently purchased Core PHP programming by Leon Atkinson, good buy? Any other books you'd suggest?
. o 0(punctuation based on imagination) 0 o .

Reply With Quote
  #2  
Old May 17th, 2002, 01:12 PM
everytime everytime is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: *.*
Posts: 133 everytime User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Newbie question

You want to use your css sheets with the php? You can do that no problem.

Reply With Quote
  #3  
Old May 18th, 2002, 04:18 PM
James Clark James Clark is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Sheffield,uk
Posts: 1 James Clark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to James Clark
RE: Newbie question

I wrote a script that did that a long time ago, not sure where it is though, i'll keep and eye out though.

The script had one template file, then you just added the data you wanted into .txt files. For example headlines.txt, then using the script, index.php you call it like:

index.php?id=headlines

Anyway, ill try and find the script, i know its somewhere.

The below code is a snippet that will do something similar and can be developed to use templates.

<?
$ext = ".php";
$id = "".$page."".$ext."";

if (file_exists($id))
{
include($id);

} else {
echo "error: page doesn't exist";

}
?>

this would be used like:

filename.php?page=whatever

that would include the page whatever.php obviously.

Reply With Quote
  #4  
Old May 19th, 2002, 03:53 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Newbie question

Awesome, I found something similar, worked great...

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Newbie question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway