[thelist] php form
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Nov 22 10:33:01 CST 2002
Since I am fairly new to PHP I have some questions about 'best
practices' for some things. I am kinda used to doing things the way I
learned them in ASP. I've been looking at others code and seeing some
differences.
1 - When writing out code to your page, is it best to:
a) echo("foo");
b) print "foo";
along with that, when you have a lot of code (say more than one line)
to output, it seems to me better to do this (usually looping through
a result set)
<?
sql etc
being some loop
?>
<normal html code with <?=$vars?> inside>
<?
end some loop
?>
I seem to find that much easier when there is a lot of stuff instead
of worrying about packing it all into one string with quote issues.
2 - What is the difference between <?php and simply <? - i'd prefer
not to type php all the time if I don't have to.
3 - question about isset() - will a form field that has no value
(i.e. <input type='text' value=''>) be considered set or not? I
seemed to have some trouble with that.
TIA
Tom
=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the thelist
mailing list