PHP Tutorial

This is a tutorial on basic PHP. I wrote it because I wanted to give something back to the OpenSource community. PHP is free, and this is my little way of saying thanks!

The tutorial is aimed at users who have no previous experience with programming in PHP or any other programming language. But there’s no guarantee that this goal has been reached. It’s very likely that there are places where the user is assumed to know things he or she won’t know at this point of learning PHP.

I wrote this tutorial after having used PHP for quite some time. Because of that, some sections of the tutorial might be difficult to understand — it’s hard to remember afterwards how difficult things were. So if you have any problems with parts of the tutorial, then please leave a comment with your advice.

Contents

40 Comments

  1. chandra:

    with thanks

  2. Cirro:

    Thanks for this. Very helpful as I try to figure out this language.

  3. Michael:

    Thanks a lot for the PHP tutorial, after realizing that ASP is mostly MS-centric, I found I need to learn PHP now!

  4. Elizabeth Pedersen:

    Martin, far younger than my own two Half Dans, I commend you on your excellent tutorial.

    I help administer a board recently relocating from an HTML coding to a PHP, having volunteered to help the site creator with image details. You give me hope my old learnings of string theory, HTML, and C, so on, will become very useful to reorganize my way of doing things.

    Til lykke!

  5. David A. Guzman:

    Hi,

    I’m total beginner in PHP language, and I’m designing a site for a client of mine. There are certain pages I would like to use PHP on, and one of them is a new account forms page.

    See, when the user enters his/her information in these fields, I would like the info to be stored somewhere, so my client can access the new customer account info, and I don’t know how do that, I can use the mailto attribute, but I don’t think it’s secure enough, and it’s tedious to cut-n-paste the info into a database. Can someone can help me out with this!?

    Also, the other page is a log-in page, and I want the customer to have access to his/her account to track the product or services down or what he/she purchased, and I would totally appreciate someone’s help on these two requests.

    Free-lance designer,
    David A. Guzman
    superguz2001@yahoo.com

  6. Rossen Alexandrov Alexandrov:

    Please, send me some tutorials and help for PHP Programming.

  7. Sourabh:

    Hello, I want you to write me the step by step process to run the WAMP server on my computer.I am using Windows XP.

    I am not finding the file config.inc.php, in phpmyadmin.

    How can i get it and where to change the password?

    I have set a new password for SQL but, as i can’t place the password in config.inc.php, SQL server is not getting connected to php.

    Please help with detail step.

    Regards,
    Sourabh.

  8. Jace Nattie:

    Keep up the great work!

  9. forumgids:

    Php is great because of it’s server side loading and not being generated by browser, which is very secure and compatible. I suggest to people who realy want to try php and build something large or complicated to use phpcake or php on rails, so you don’t need to know alot about php-programming and php-structure.

  10. marieraman:

    hi

  11. Alice:

    I always find it amusing, how people come swooping in with “I want you to help me do this…” requests/demands in response to tutorials.

  12. Mario:

    Thank you, Martin. Excellent!! Nothing more to say. Keep going forward!

  13. Cooper:

    @Alice: Yeah it is kind of pathetic… seems lots of people expect everything handed to them on a silver platter… those people never get far anyway :) It’s the people like us who work hard that get there ;)

  14. Bubbila:

    Sweet tutorials, just what I have been looking for! Well Pleased…

  15. php programming:

    Thank you, Martin. Excellent!! Nothing more to say. Keep going forward!

  16. PHP tutorial « PHP MySQL Problems:

    [...] Martin Geisler Online » PHP Tutorial [...]

  17. sree murugan:

    hi i wany to study php i want all the information about php so mail to my id ……..

  18. tibe:

    i want to study php.

  19. tibe:

    tutoials please send me

  20. Jeff:

    Great resource, thanks for putting it together.

  21. Frank:

    The is a great resource. Thanks for putting it together. As a newbie to php, I find I work best with cheat sheets. Sine I always have my iPhone with me, I keep them there. The best one I’ve found so far is from these guys:

    http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=302760278&mt=8

    They also have a great cheat sheets for CSS and Javascript. Hope this is helpful!

  22. Morgan Ads:

    Thanks a lot for yours publications :)

  23. Seo Cherubin:

    Thanks for ressources and tutorials :)

  24. olaoluwa:

    thank man great job

  25. Computer Programming Tutorials:

    Thanks a lot. Keep it up.

  26. New Line Equity:

    Thanks a lot for your valuable notes

  27. Will Knight:

    This is really good stuff, thanks for being informative.

  28. Web Devlopment:

    Martin,
    I feel happy to read the tutorials, currently following your procedure, Thanks to sharing this informative stuff here.

  29. Gregory:

    I can recommend start editing your PHP files on FTP servers using http://online-php.com.
    Very useful and simple

  30. Sarah-Ann:

    Great tutorial, really appreciate it. Also found some excellent reading at Tutorial arena

    Sarah
    ‘There is no such thing as “negative growth”‘

  31. Will Knight:

    Well I did not know that by putting your code into functions, you make the code easy to reuse.Thanks for the tutorial.

  32. PHP Tutorials and help:

    [...] guide – Guidance from the PHP Security Consortium on how to develop more secure applications. PHP tutorial – Martin Geisler – This tutorial is aimed at users who have no previous experience with programming in PHP or [...]

  33. guru:

    Hi, i am a beginner of php language. it is very useful for everyone

  34. Guhan:

    It is very used when i want to study in online

  35. Media:

    New in php world thanks for the lessons.

  36. Alfred kevin:

    i like u r site very much. it’s very useful to me..

  37. Font Creators:

    It is very useful for web desidners

  38. best php training:

    excellent job martin.your way is very good so keep going on.i am greatly thankful to you.

  39. phpranjan:

    Thanks a lot for that , as you know the php is very easy to understand and you articles making it more easy to learn , thanks a lot for that

  40. ferns and petals:

    I learnt php from this tutorial book only, and im not able to create websites like i mentioned by my own. thanks webmaster john