View Full Version : looking for really good PHP tutorial

02-09-2003, 09:41 PM
presently i have been seeing less and less html pages and more and more PHP or ASP pages.all these forums and professional pages ive seen have been using PHP and id like to evolve from HTML to PHP. i have no clue what its about and i wanna get started with a good tutorial that provides lots of specifi details and explanations. any suggestions?

02-09-2003, 09:51 PM
Firstly, html is still used in asp and php :) PHP is run on the serverside of things, where as html is client side.


You may also want the phpdev package from http://www.firepages.com.au

02-09-2003, 09:57 PM
i have no idea what the difference in clientside and serverside is.

02-10-2003, 12:06 AM
Client side is basically code and scripts which are executed on a users PC, such as DHTML, HTML, Javascript etc. PHP, ASP, CGI, etc are all serverside, meaning it is all processed by the server and the results are decided before it gets back to the user.

Some scripts you find in javascript can drain the life out of low spec pc's as it gets executed in the users browser, but if it's done in a serverside language (php, asp, etc), it won't drain the users pc at all as it's all executed wayyyyyyy before it gets tot he browser

Someone can prolly explain it better, I know I've explained badly :p

02-10-2003, 01:10 PM
I will try and explain server-side and client-side better:

Take for example a password validation system:

Using JavaScript it is possible for the user to view the page source and find out what information the script contains, so it is not difficult to get past javascript security. This is because all of the password validation is happening on the users computer while they are browsing the internet.

If you were using PHP for example, The user would enter the password in the password box then click the Submit Button. The password that they have entered gets sent to the server, validated there, then it sends the info back without including the page script. This means that users cannot simply look at the page source and find the password.

This is the sort of question that is quite hard to explain, but I hoped it helped. Also, cos I don't have anything better to do, I have put a few code frags that you will find useful in starting PHP.

echo "Text"; // Writes text to a page
echo("Text"); // Does exactly the same as above
print "Text"; // Does exactly the same as above
print("Text"); // Does exaxtly the same as above.

$variable = "Text"; // Sets a variable, used to contain information

# You can write a variable like this

echo "The word is: $variable"; // Will output The word is: Text

Hope I helped :thumbsup:

P.S: I have a new site that runs of PHP: www.missingscore.co.uk

02-10-2003, 01:40 PM
Originally posted by BloodXero
i have no idea what the difference in clientside and serverside is.

Apart from what has been said already, I can only advise you to make some research on your own and try to understand the difference *before* you start coding PHP. The client-server architecture is the basic working principle of the Internet as we know it today, and there should be plenty of introductory articles floating around that cover these aspects in great detail. I don't know of any good ones in particular, but a quick Google search should yield some results worth reading. Doing this will save you some hours of brain-crunching over problems that are not in the domain of PHP, like

- getting the user's screen resolution
- opening a page in another frame
- changing the visual apperance of page elements

Knowing that PHP operates on the server tells you immediately that each of the above problems is simply not solvable by PHP, so there is no need for searching the manual for ages.
What also serves as an eye-opener is the difference of POST and GET requests which is important if you deal with forms to interact with your scripts.

Some good sites for learning PHP not mentioned yet are:
http://www.phpdeveloper.org (and the other sites of their network)

02-10-2003, 09:37 PM
there are pdf files of various lengths on kazaa...

I recommend SAMS teach yourself php in 24 hours. It may bore you... its about 400 pages, but if it makes any difference, you can skip to page 70 or so if you already have php installed locally or plan to use a remote server for testing.

As an aside, thou shalt not temp your God with chocolatey coated ice cream loaded big and thick, no room for a stick!!!!