CodeIgniter Forums
HTML vs Code Forms - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: HTML vs Code Forms (/showthread.php?tid=39494)



HTML vs Code Forms - El Forum - 03-11-2011

[eluser]CI_Newb[/eluser]
Just a question regarding best practice or thoughts on this.

So you have a large form, do you

a) code the form in standard html, php stuff like that or
b) code the entire form in php using echo's and the sorts.

I just redid 1 of mine and the all code looks much cleaner but just wondering what the pro's do.


HTML vs Code Forms - El Forum - 03-12-2011

[eluser]Edmundas KondraĊĦovas[/eluser]
Any decent web application doesn't put HTML code in PHP files with echo/print. There are more elegant ways to do it. Some people use templating systems like Smarty, while others are comfortable with what, for example, CodeIgniter offers (you can take a look at CodeIgniter user guide).

In general, the question is a bit abstract because it all depends on the situation.


HTML vs Code Forms - El Forum - 03-16-2011

[eluser]CI_Newb[/eluser]
Thanks for the info, figured doing it with echo/print wasn't the best way to do it since I really didn't see any need to do it that way, just more out of boredom.