Real Estate Forums

Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here.

Reply
 
Thread Tools Display Modes
Old 04-03-2008, 12:10 PM
Sunset Sunset is offline
New real estate webmaster
 
Join Date: Dec 2007
Posts: 5
Sunset is on a distinguished road
Default Re: PHP vs. HTML

I think the important things are not so much what technology one uses to built pages, but more of the methods that the individual uses in building the site.

For example: A person does not have to use PHP to prevent repeat content. If I want to centralize the code for my navigation to one file, yes, I could use PHP to do that with
Code:
require_once('nameofnavfile.php')
. If I create a file called "nameofnavfile.php" that contains the code to write the navigation, then everywhere I used the above require_once() would show the file.

HOWEVER - The exact same concept can be created with server side includes if you use the .shtml extension.

The important thing in this case is that the principle of centralizing code is being practiced.

The real power of PHP lies in making decisions BEFORE you write the page. See, the PHP writes the HTML code that the browsers display so, if you want to render the page based on variables.

I know this veers off the original question a bit, but I'll follow up with another post that will be more on topic.
__________________
Missouri Real Estate - Serving Southwest Missouri
Branson Lake Homes on Table Rock and Lake Taneycomo
Branson Lake Condos and nightly rental properties
Reply With Quote
Old 04-03-2008, 12:31 PM
Sunset Sunset is offline
New real estate webmaster
 
Join Date: Dec 2007
Posts: 5
Sunset is on a distinguished road
Default Re: PHP vs. HTML

Now, the original question had to do with whether it is detrimental to use PHP extensions for pages.

IMO - Again, it is not about the technology, but rather the manner in which you build pages.

For example, ask yourself, can I navigate to the page via a link? If it is a static HTML page, you can (I say static, because it is possible to parse HTML as PHP so the extension says HTML but really, it is a PHP page - incidentally, this is why I don't believe one extension is favored over another).

One might wonder "how a page could exist without having an internet address?"

Well, if the page is dynamic and doesn't get built without parameters being sent to it (like a real estate search form using the post method), then you can't browse to it via a link. Now, how is anyone ever going to link directly to the results of a specific search if there is no address to get directly to the page? See, the search form may be located at
Code:
http://www.somesite.com/search.php
, when you go to the page, you click some boxes and fill in some fields and then click search. The results page is usually the same page, no matter what parameters the searcher clicked, PHP decides what content to show based on the variables, sent. Since the results are different for each search but the address is the same, what's the point indexing the page for homes in the price range of 75,000 to 150,000?

In this scenario, a pre-existing page (PHP or HTML) that always renders the same results, would make sense if you wanted people to link to the page because it was for a specific price range.

I hope I didn't ramble or confuse things, but the basic point is:

The structure of the site and how you do things is more important than what technology or language you use to do them.
__________________
Missouri Real Estate - Serving Southwest Missouri
Branson Lake Homes on Table Rock and Lake Taneycomo
Branson Lake Condos and nightly rental properties
Reply With Quote
Reply


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
html vs. php Dave Kovaleski Coding 29 08-12-2007 12:28 AM
Coding a HTML Link in PHP RESteve Coding 5 05-19-2007 11:50 AM
Any benefit to having pages ending in html vs. php? RESteve Real Estate and Google 12 04-26-2007 11:50 AM
HTML or PHP? mikelong Coding 15 05-21-2006 09:03 AM

REW Conference

For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 02:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.