GlockTalk.com
Home Forums Classifieds Blogs Today's Posts Search Social Groups



  
SIGN-UP
Notices

Glock Talk
Welcome To The Glock Talk Forums.

 
  
Reply
 
Thread Tools Display Modes
Old 11-14-2008, 17:52   #1
rsagona1
Hello
 
rsagona1's Avatar
 
Join Date: Jun 2006
Location: Somewhere in MD
Posts: 6,370


For the PHP guru's...

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 Code:
<html> <title> [php_processed_var]</title></html>
In the PHP file, I just do all my data processing and declare the variables.

PHP Code:
<?

$php_processed_var 
Hello World!
?>
My code is ALOT cleaner. And I actually feel confident about showing it off.
rsagona1 is offline   Reply With Quote
Old 11-14-2008, 18:00   #2
Fire_Medic
CLM Number 261
Polymer Butcher
 
Fire_Medic's Avatar
 
Join Date: May 2008
Location: The Gunshine State
Posts: 8,129
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.
__________________
Florida Glockers Club #2250, BHP Club #2250, Niners Club #2250, G1 Niners Club #2250, Black Rifle Club #2250, S&W Club #2250, 40SW Club #2250


To view links or images in signatures your post count must be 10 or greater. You currently have 0 signatures.

ΜΟΛΩΝ ΛΑΒE

RIP GioaJack!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 signatures.
Fire_Medic is offline   Reply With Quote
Old 11-14-2008, 18:01   #3
rsagona1
Hello
 
rsagona1's Avatar
 
Join Date: Jun 2006
Location: Somewhere in MD
Posts: 6,370


Quote:
Originally Posted by Fire_Medic View Post
Why's this in general Glocking?
Oops!
rsagona1 is offline   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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT -6. The time now is 19:32.




Homepage
FAQ
Forums
Calendar
Advertise
Gallery
GT Wiki
GT Blogs
Social Groups
Classifieds


Users Currently Online: 1,272
371 Members
901 Guests

Most users ever online: 2,672
Aug 11, 2014 at 2:31