Is my code old fashioned?

Hi there,

Someone just absolutly slated one of my sites to be old fashioned plus coded badly. I think they dont understand what they’re talking regarding.

Can anyone comment on this code along with tell me if its expired or old created or plainly simply wrong

This can be a basic site without dynamic however several aspects of it are puilled coming from php files including the menu and this footer etc.

Code:
<! DOCTYPE html PUBLIC " -//W3C//DTD XHTML YOU. 0 Transitional//EN"
" http: //www. w3. org/TR/xhtml1/DTD/xhtml1-transitional. dtd" >
< html xmlns=" http: //www. w3. org/1999/xhtml" xml: lang=" en" >
< head>
< meta http-equiv=" Content-Type" content=" text/html; charset=utf-8" />
< title> Major Cultivation Parts Agricast< /title>
< meta name=" keywords" content=" Major Cultivation Parts, agricast" />
< meta name=" description" content=" " />
< meta name=" copyright" content=" Copyright 2011 Most Rights Reserved" />
< meta name=" author" content=" " />
< meta name=" robots" content=" list, follow" />
< link rel=" stylesheet" href=" agricast. css" type=" text/css" />
< script type=" text/javascript" src=" http: //ajax. googleapis. com/ajax/libs/jquery/1. FOUR. 2/jquery. min. js" > < /script>
< script type=" text/javascript" src=" fadeslideshow. js" >
/***********************************************
* Epitome of Fade In Slideshow v2. 0- (c) Vibrant Drive DHTML value library (www. dynamicdrive. com)
* The following notice MUST keep intact for appropriate use
* Check out Dynamic Drive at http: //www. dynamicdrive. com/ in this script and Thousands more
***********************************************/
< /script>
< script type=" text/javascript" src=" fader. js" > < /script>
< script type=" text/javascript" src=" iepngfix_tilebg. js" > < /script>
< /head>

< body>
< div class=" container" >
< div class=" header" >
< php include 'google_search. php'; >
< /div>
< div class=" bottom" >
< div class=" left_menu" >
< php include 'main_menu_norm. php'; >
< /div>
< div class=" right" >
< div class=" body_text" >
< div class=" body_big" >
< strong> Refurbishing a person's cultivation kit is usually 100%
tax refundable for a fraction of the price! < /strong>
< /div>

< p>
Agricast are usually specialists in sourcing Blank disc Blades, Press Rolls,
Cambridge Rings, Neck Rings, Subsoil Feet, Wear Points
and Tungsten parts special from foundries.
< /p>
< p>
We search the world for the most acceptable steel to consist of
costs, ordering throughout bulk, passing the particular saving Direct to be able to our
customers.
< /p>
< p>
< strong> For your most competitive prices and overnight distribution,
simply phone James in your FREE Quote. < /strong>
< /p>
< /div>
< div class=" animated_image_holder" >
< div class=" image_spacer" > < /div>
< div id=" fadeshow1" > < /div>
< /div>
< /div>
< div class=" mid_clear" >

< /div>
< /div>
< div class=" footer" >
< php include 'footer. php'; >
< /div>
< /div>
< /body>
< /html>

I’d delightful any comments, with thanks.

Without seeing what’s inside other PHP files, it looks fine to me. It’s different out of what I accomplish, for sure, but that’s hardly the exam for whether it is really good or certainly not. It’s semantic XHTML, no tables where possibly not necessary. The only idea I see is there are many of divs, and some of them could probably be replaced by way of other means, which isn’t that big a deal breaker.

My guess is usually you’re the victim of your HTML5 snob. I put it to use for my design, but it really comes to preference. Don’t be worried about it, you’re carrying out fine.

Thanks for your feedback Ronald I have now spoken to him and it also turns out his only issue was that the header of the positioning wasnt a PHP file therefore he had to edit text with a few different internet pages, normally Id achieve that bit as a great include but i thought this was such a little site I hadnt side tracked. It was just simply the language he utilized in his email seemed to be so harsh and made out WHEN I hadnt got some sort of clue what I used to be doing which created me doubt me personally.

Nice to hear the second opinoin though, with thanks again

It can be actually very " old-fashioned" to use includes for header/footer.

Modern MVC-style templating goes on the outside in. So you may have a page and also wrapper template, subsequently a body comprise inside that, as well as a router will determine what gets put on the inside what.

It’s types of hart do explain, but the end result is that you do not have any duplicated code from page in order to page, and you are not using includes on every page to help render your header and also footer.

Ah, thanks for in which, so it turns out he was perfect and wrong concurrently.

Ever advise doing that for your simple 10 article site though thats definitely not dynamic I’d implement something like that if We were creating a large dynamic site.

Do you find it truly is more time consuming to try and do it that way as you must setup the router

Speaking of which are you experiencing any links to information on creating a router as this is certainly something Im definitely not aware of and want to get my coding as much as speed

With thanks

Thing can be, that’s the form of thing you create once and never have to do again. I do not have any links, regrettably. But for your basic router, work with a url structure in this way:

http: //www. mysite. com/path/to/file < — be sure not to inclue the extension (no ". php" )

Subsequently use. htaccess in order to interpret that:

Code:
RewriteRule (. *) /index. phppage=$1 L, QSA

Then, make your index. php internet page router to interpret the " page" param:

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *