Html hard-coded or SQL base?
Please be indulgent - I am an old-school RPG and COBOL programmer and newly "recycled" in modern programming.
I am setting up a website to sell tickets with prices varying according to:
- arrival point
- type of transport (shuttle, private, VIP)
I was surprised to see that in all of the websites I viewed and in the tutorials I have been using to help me out, the values on drop-down boxes are hard-coded in the html file. I expected them to coming from an external database. Is hard-coding in html now considered best practice? Does it matter?
Apart from the fact it looks ugly, I was just thinking that if in the future the company wants to apply a 10% increase, it would be easier to do in an external database and retreive via SQL than going to change every price manually in the html.
Thank you in advance.
It could be you're mistaken about what's going on. If you are viewing the *output* of these web sites, by something like "view source" in your browser, then you are unlikely to be seeing the actual code of the web site. Such a site may very likely be querying a database to collect navigation structure, lists of flights, prices, etc, and then formatting and outputting the html to the browser.
I.e. you're looking at a printout on green and white striped paper and asking why someone is bothering to manually type that page up each time
I also think the same as "tracknut"... Dropdown list concept is not at hardcore programming, its quite easy....
Thank you. Yes, I see your point!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)