Forum Moderators: coopster
Example, to "print" the visitor's IP address, I use
<html><head></head><body><?php print $_SERVER['REMOTE_ADDR'];?></body></html>After seeing someone's codes, I saw an easy way<?=$_SERVER['REMOTE_ADDR'];?>So, you know any more of that? And for MySQL, I know there are many ways to retrieve the results. But how? Can you really teach me on how to use MySQL in PHP? Especially in LOOPS. I'm planning to create my own CMS. Please help me again. For my first thread, thank you all for helping me. But in this new thread, please help me!
[edited by: ergophobe at 7:09 pm (utc) on Feb. 28, 2005]
[edit reason] language - TOS [/edit]
And before focusing on short cuts, work on getting the 'right' way down. For that 'trick' you listed, I never use it. The time it would save me typing '=' instead of 'echo', isn't worth the possible confusion later when looking at the code.
Although it helped that PHP was not my first language. I was already fairly fluent in VB, ASP, VBScript, and JavaScript before trying PHP.
Which not only help you working one code chunk at a time but also allows for other coders to understand your reasoning
So be sure to segment your code in chunks that are meaningful and can be reused for other coding purposes; for example not only an authentication function can easily be called just by calling the function but its main advantage is that it can be used and reused in many other scripts.