Results 1 to 4 of 4

Thread: Html hard-coded or SQL base?

  1. #1
    Join Date
    Feb 2011

    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:
    - destination
    - 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.

    Any ideas?
    Thank you in advance.

  2. #2
    Join Date
    Aug 2006
    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


  3. #3
    Join Date
    Aug 2012
    1453 Gingerwood ave, Milpitas CA 95035,
    I also think the same as "tracknut"... Dropdown list concept is not at hardcore programming, its quite easy....

  4. #4
    Join Date
    Feb 2011
    Thank you. Yes, I see your point!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center