Jump to content

Learning Php


tehfoot

Recommended Posts

Hey,

I have been invited to work on a project involving PHP, however I have very little knowledge of PHP itself.

Where should I go to learn PHP and what kind of programs should I use?

Any help is appreciated.

Thanks in advance.

Link to comment
Share on other sites

The only "programs" you should need are PHP itself ( http://www.php.net/ ) either on your computer or a server and a text editor (Notepad++ is a good one http://notepad-plus.sourceforge.net/uk/site.htm , but any one would work).

W3School usually has good web tutorials, you can find their PHP one at http://www.w3schools.com/php/default.asp

And most importantly, http://www.google.com :P

Link to comment
Share on other sites

The only "programs" you should need are PHP itself ( http://www.php.net/ ) either on your computer or a server and a text editor (Notepad++ is a good one http://notepad-plus.sourceforge.net/uk/site.htm , but any one would work).

W3School usually has good web tutorials, you can find their PHP one at http://www.w3schools.com/php/default.asp

And most importantly, http://www.google.com :P

Just checked out the W3School site looks reallly good, thank you very much :lol:

Random question, which is better using XAMPP or just installing PHP is there a difference?

Thanks

Link to comment
Share on other sites

Best way to start in my opinion is by looking at some examples of the goal you are trying to accomplish. It's not bad to "clone" something, just don't copy and paste. By typing you learn more then by pasting.

That said, get an editor with decent syntax highlighting, that's notepad++ on windows, textmate on mac. And on all platforms you can use Eclipse PDT (the php variant on Eclipse).

So say, you are creating a guestbook (i'd imagine something bigger for your project, but alas), just take a peek at how they are doing it, because you end up just not only learning PHP, but also architecting your application, speaking with databases and the whole bunch of other things around that. (That is assuming you aren't already familiar in such theoretics, if you are you probably will pickup PHP by just doing it :) ).

Link to comment
Share on other sites

I would go with xampp for windows, since it installs apache. You will want to have that because you will want to test it in a browser and to do that you need a web server of some sort. Otherwise, all you code in php is viewed in a console, and not a way to test thigns like inputting form information, etc. PHP by itself can do server side things, but all you would be doing really is instructing the server to do stuff. You wont see any output or get a GUI to interact with clients like you would on a website. Also, XAMPP gives you MySql, so if you needed to test a wordpress or joomla setup, you could fully have a working wordpress site/database setup on your local machine before deploying it to your live website. Just make sure you secure phpMyAdmin and don't allow people to get to your machine from th einternet on port 80, or they can access your local machine remotely from the web interface when apache is running.

W3 schools is good starting point for basic PHP stuff as well as http://php.net/ but I generally just google for what I need when I need it. Just know that blindly copying code you find online can also be a risk, make sure you validate and test anything for holes before deploying it, such as forms that don't sanitze for cross site scripting, upload scripts that allow php files directly, etc.

Edited by digip
Link to comment
Share on other sites

When I first started learning PHP I used WAMP, which is very similar to XAMPP however from a beginners point of view I reckon WAMP is easier to configure. If you've done Web-Dev stuff before then XAMPP would be better but if you're started Web-Dev for the first time then I would suggest WAMP. It also depends on what type of machine you're going to be writing your code. If you're going to be writing code on a Linux box then you'll either have the choice of LAMPP (the same as XAMPP) or installing the seperate parts yourself which can be tricky for a first time user.

Personally I reccomend that you try an all-in-one solution to begin with and then when you become more proficient you could even try compiling PHP with FastCGI and things like that. Also don't forget that there is more than one webserver out there, don't stick to Apache for life.

Link to comment
Share on other sites

Hey,

Thanks for the input :)

I checked out Notepad ++ and quite like it. (still getting round to Eclipse PDT)

Also thanks for the advice of not pasting, it has actually helped me out.

I tried some sample codes as well and I found it alot easier to pick up then from scratch.

So thankyou :)

Best way to start in my opinion is by looking at some examples of the goal you are trying to accomplish. It's not bad to "clone" something, just don't copy and paste. By typing you learn more then by pasting.

That said, get an editor with decent syntax highlighting, that's notepad++ on windows, textmate on mac. And on all platforms you can use Eclipse PDT (the php variant on Eclipse).

So say, you are creating a guestbook (i'd imagine something bigger for your project, but alas), just take a peek at how they are doing it, because you end up just not only learning PHP, but also architecting your application, speaking with databases and the whole bunch of other things around that. (That is assuming you aren't already familiar in such theoretics, if you are you probably will pickup PHP by just doing it :) ).

Link to comment
Share on other sites

When I first started learning PHP I used WAMP, which is very similar to XAMPP however from a beginners point of view I reckon WAMP is easier to configure. If you've done Web-Dev stuff before then XAMPP would be better but if you're started Web-Dev for the first time then I would suggest WAMP. It also depends on what type of machine you're going to be writing your code. If you're going to be writing code on a Linux box then you'll either have the choice of LAMPP (the same as XAMPP) or installing the seperate parts yourself which can be tricky for a first time user.

Personally I reccomend that you try an all-in-one solution to begin with and then when you become more proficient you could even try compiling PHP with FastCGI and things like that. Also don't forget that there is more than one webserver out there, don't stick to Apache for life.

Umm interesting!

Edited by Infiltrator
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...