Differences between version 5 and revision by previous author of HowToPHPHOWTO.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Saturday, May 22, 2004 9:46:38 pm | by JeremyArnold | Revert |
Older page: | version 4 | Last edited on Thursday, April 17, 2003 1:38:17 am | by TimImnaishvili | Revert |
@@ -1,8 +1,52 @@
+Note (22 May 2004) JeremyArnold: ' The existing HowTo is in short "not the best" and since I talk PHP in my sleep and hang around WLUG for exesive amounts of time I may as well start a rewrite. '
-PHP HOW
-TO
+!!!
PHP HowTo
+!JeremyArnold
- 22 May 04
+-----
+!!Introduction
+PHP was created for serverside scripting of web pages. From Humble beginings it has become one of the most powerfull languages for web application development.
+Advantages of PHP (over other languages):
+* Rapid Development. PHP is simple, fast and effective.
+* PHP can be as simple or as complex as you like.
+* One of the best Manuals of ANY language I've used (or even tried to learn) http://www.php.net/manual/en/
+* C/++ based, if you can program in C/++ or even PERL or JAVA, you should be able to take to it like a fish to water.
+* Built in mySQL API (built in SQL DB in PHP5beta)
+* so many many more ....
+Cons of PHP: Yes, there are some downsides to PHP
+* Not as modular (OOP) as JSP (JavaServerPages) / Serverlets.
+* Easy to code without thinking.
+
+!!Getting Help!
+Always check the ONLINE manual. %%% http://www.php.net/manual/en/ %%% It has a wealth of user submited notes and is catagorised by Function. %%%
+You can generally find myself in either #WLUG or #PHPHELP on the undernet IRC network. There is also #PHP on the same network but phphelp is so much better! (ShamelessPlug) ;)
+
+If there is enough interest I will continue to expand this section as I have time / people bug me.
+
+!!Installation
+See the docs below (outdated) or the Manual ... This is one program where it pays to read the manual when things down work.
+Else come and me ask nicely.
+
+!!Tips
+
+__DONT__ put $_POST, $_GET or $_REQUEST varible straght into an SQL statment! Rather put the varible through the [mysql_escape_string()|http://www.php.net/manual/en/function.mysql-escape-string.php] function.
+Ignoring this leaves you database exposed to attacks from ScriptKiddies. %%% ie.
+ $myVarFromForm = $mysql_escape_string(($_REQUEST['myVarFromForm']);
+ $SQL = "SELECT * FROM mytable WHERE mycol = '$myVarFromForm'";
+
+"" != '' - you can insert varibles directly into double quoted strings! Arrays (and objects) can also be inserted this way by puting the varible in a set of {} squiglyBrakets ! %%% ie.
+ $var = 'Hello ' . $name . ', ' . $myArray[[3] . ' is the 3rd array element';
+can be writen as
+ $var = "Hello $name, {$myArray[[3]} is the 3rd array element";
+
+I would tend to use {$name} for clarity.
+
+-----
+
+
+Original PHP HOW-TO
----
!!!PHP HOW-TO
@@ -4015,9 +4059,9 @@
<
?php
/* phpCodeSite (Idea from !CodeSite - Raize Software)
* @version 0.1b - 20001125
-* @author Sé
bastien Hordeaux - <
+* @author S�
bastien Hordeaux - <
marms@marms.com>
* @licence GNU Public Licence
* Main site : http://phpcodesite.phpedit.com
*/