473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

PHP: The next step for me (Much rambling)

Hi all

I've been messing with PHP for a while now and have reached a point
where I can make it do just about anything that I want it to do. That
doesn't mean that I can make it do anything, far from it, just that I've
got to the point where I've got no 'real world' projects to further my
knowledge.

My next goal is to make my code much more graceful and efficient.

For example, I've written a CMS. To make this work, I have to create
about 5 or 6 template pages, eg:

1. content.php - this selects from the content table where id=x
2. news.php - this selects from the news table where id=x
3. allnews.php - this selects from the news table where today >
release_date and today < closing_date

I'm sure that there must be a better way of doing this so that if, for
example, a customer wants to change the look and feel of the site, I
only have to change ONE page instead of 5 or 6.

The problem is, I don't know what I should be learning about next. It's
like knowing that there's a more efficient way to get from A to B but
not knowing that you need to learn to drive because you don't know the
existence of cars, if that makes sense. I have a feeling that this
could all be accomplished through using functions in an external
functions.inc file or something. Should I be using case and switch and
passing some sort of 'action' flag with the URL - &flag=news or
something - so that it knows which query to run?

I'm just a bit lost now. I'm not looking for someone to do it for me
but maybe someone who can tell me what I should be reading about next.

Cheers

Andy
Jul 17 '05 #1
2 1649
I noticed that Message-ID:
<an************************@newstrial.btopenworld. com> from Andy Jacobs
contained the following:
1. content.php - this selects from the content table where id=x
2. news.php - this selects from the news table where id=x
3. allnews.php - this selects from the news table where today >
release_date and today < closing_date

I'm sure that there must be a better way of doing this so that if, for
example, a customer wants to change the look and feel of the site, I
only have to change ONE page instead of 5 or 6.


Well if the pages are properly marked up, this is just a question of
storing CSS information surely?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
JAS
> I'm just a bit lost now. I'm not looking for someone to do it for me
but maybe someone who can tell me what I should be reading about next.

Cheers

Andy


CSS is the way forward for you -- dont have people edit your PHP pages,
have them control the pages using CSS and give them the ability to turn
bits on and off without tampering with the code. The seperation will
make it a lot easier to maintain as well. You'll be able to completly
re-tool a page without have to have people re-edit it to make the
changes they did.

J
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
by: 127.0.0.1 | last post by:
With all the problems with having register_globals = on, I propose the following idea: We define register_globals_manual = on as a new configuration default. What this does is enable 3 new...
24
by: Google Mike | last post by:
I guess I'm talking to get this off my chest. I guess I'm talking to the newbies out there wondering if they want to remain on ASP.NET, C#, JSP, or whatever, or whether they want to do their next...
17
by: Phil Powell | last post by:
Where can I find an online PHP form validator script library to use? I have tried hacking the one here at work for weeks now and it's getting more and more impossible to customize, especially now...
16
by: Mudge | last post by:
I am reading a book called "PHP, Apache, MySQL Web Development" http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764557440.html and in its example code it sometimes will have a "\n" in it. It is...
7
by: petermichaux | last post by:
Hi, I'm interested in building database web applications. A perfect example of what I want to do would be an e-commerce website with php, xml, xsl, css, pear db and mysql. I understand the...
6
by: news | last post by:
I need some concise, easy to grok examples of what .Net (preferably C#.Net) has over just using old ASP or PHP with JavaScript. See, I'm a PHP guy, and while I started server-side scripting with...
1
by: David Fowler | last post by:
I'm new to getting in touch with other PHP users/PHP team, so please excuse me if this post is at all inappropriate or in the wrong place. In the current release of PHP (5.1.4) and in the CVS for...
6
by: avlee | last post by:
Hello I am planning in my company to move to php.MVC framework - to create several big web applications. What are your opinions of this framework ? Is it the best MVC framework for PHP ? What...
11
by: mezzanine1974 | last post by:
I am a freashman in Web design. I spend my time on studiying ASP.NET in these days. But whenever i check web for discussions comparing ASP to PHP, there are so many people who put positive comment...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.