close

Privacy guaranteed - Your email is not shared with anyone.

Welcome to Glock Talk

Why should YOU join our Glock forum?

  • Converse with other Glock Enthusiasts
  • Learn about the latest hunting products
  • Becoming a member is FREE and EASY

If you consider yourself a beginner or an avid shooter, the Glock Talk community is your place to discuss self defense, concealed carry, reloading, target shooting, and all things Glock.

For the PHP guru's...

Discussion in 'Tech Talk' started by rsagona1, Nov 14, 2008.

  1. rsagona1

    rsagona1 Hello

    2,394
    0
    Jun 21, 2006
    Somewhere in MD
    No question to post. Just to say, I vow to never, ever, ever mix HTML & PHP within the same document again.



    I learned (incorrectly) to echo out HTML within a php document after data processing. It got ugly. I wrote about 5k lines of code and I got angry and deleted it all.

    I started over, this time..actually using some common sense. I decided to use a template engine. If you're not familiar with this, google it, there are about 50 to choose from.

    It allows you to create HTML templates, store 'em away, and just use variables within the HTML document to link to the PHP data.

    i.e.:
    HTML:
    <html> <title> [php_processed_var]</title></html>
    In the PHP file, I just do all my data processing and declare the variables.

    PHP:
    <?

    $php_processed_var Hello World!
    ?>

    My code is ALOT cleaner. And I actually feel confident about showing it off.
     
  2. Fire_Medic

    Fire_Medic Polymer Butcher CLM

    8,097
    12
    May 19, 2008
    The Gunshine State
    post deleted my error.


    oh it was in general glocking lol, I thought I was going nuts. Glad you got your codes all figured out.:supergrin:
     


  3. rsagona1

    rsagona1 Hello

    2,394
    0
    Jun 21, 2006
    Somewhere in MD
    :wow:Oops!