PDA

View Full Version : PHP Where to start



luismgl
January 3rd, 2012, 02:55 PM
I would like to ask where to start (what books to read mainly) would you recommend to learn to program in PHP.
I know a bit of C so programming in it self is not entirely new for me.
I decided to learn PHP after reading a book on Tuxradar about practical PHP programming and I would have kept going with it, but I´m the type of person that prefers to read in physical rather than digital format. So for those of you experienced with PHP, I am asking recommendations for books for beginners such as myself.

Thank you.

CoffeeRain
January 3rd, 2012, 03:42 PM
I mainly just found out all the stuff that can be done with PHP and decided to make a webpage. When I wanted to know something, I googled it. I would recommend installing XAMPP (http://www.apachefriends.org/en/xampp.html), because the interface between the XAMPP control application and the inside workings itself is smooth, and because it easily gives you a way to run PHP files and work with mySQL. I found the PHP website hard to use, but it gives a barebones description. If you don't know how to, I would recommend learning the basics of HTML too. This is crucial to creating a website, because HTML and Javascript can also run on a PHP webpage. Good luck and have fun!):P

luismgl
January 3rd, 2012, 05:49 PM
Thank you for you reply :)
I was as well thinking about C++ where I could probably put my knowledge of C to good use, I realize it´s much harder than PHP so a lot more effort will have to be put to it but it might be more useful in the future. Also by learning PHP, it would be useful to know how to operate with mySQL which I don´t :P

So I'm standing on a forked road, both are equality interesting for me although I have a feeling C++ would be more useful for a future career

yndesai
January 3rd, 2012, 06:10 PM
So I'm standing on a forked road, both are equality interesting for me although I have a feeling C++ would be more useful for a future career

You must select the language for the purpose. I use python to solve my problems. It is a real quick fix for creating small apps to trying something on AI.

If you are looking for job better check what your prospect employer is looking for. ABAP, and .net are other choice for career in coding.

CoffeeRain
January 3rd, 2012, 06:20 PM
In the "real world," applications and web pages are useful. If you were coding as a hobby and you showed a friend a program that was run by the command line, chances are that they would think you are weird or not appreciate all your work just because it doesn't use a GUI. I think web programming is easier than trying to build an application. If you are trying to build an application, QT and Tkinter are pretty good. Tkinter uses Python and I think QT comes for Python too. I don't know though.

Dragonbite
January 3rd, 2012, 06:33 PM
Desktop? Mobile Apps? Web? Decisions, decisions...

I find it easiest to learn a language when I have a project to work on, build and when I need a language- or use-specific question then research that with books and online.

If you have an interest in mobile apps, what language(s) do they use?

Xampp is a great tool to give you a PHP environment without a lot of installing and work customizing and if you are stuck going between Linux and Windows it can be used in both so you have a consistent platform to work.

It all comes down to what you feel like. Me? I have worked mostly on web applications and feel more comfortable with them so far.

luismgl
January 3rd, 2012, 07:58 PM
While mobile apps are in the order of the day, I don´t feel it´s right for me at the moment. I believe then I'll take my chances to understand PHP and MySQL and in the future go to move to Pearl and C++.

It´s been 1,5years since I last programmed and the little bug just started to move around wanting to be fed lol.

So I already started to take a look at the XAMPP at apachefriends.org and it seems interesting.So what reading material did you guy use to star with PHP and MySQL?

Dragonbite
January 3rd, 2012, 08:18 PM
Beginning PHP4 (Programmer to Programmer) .
http://ecx.images-amazon.com/images/I/51kMyu4veDL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg (http://www.amazon.com/Beginning-PHP4-Programmer-Wankyu-Choi/dp/0764543644/ref=sr_1_18?s=books&ie=UTF8&qid=1325618144&sr=1-18)
It was "alright", but did help get me started. Since then I've been using what I little I know as to how I want to build it, and then Google has helped with the rest.

na5h
January 3rd, 2012, 09:13 PM
w3schools.com (www.w3schools.com) is a great place to start!

mörgæs
January 3rd, 2012, 09:44 PM
For PHP (and MySQL, if you want to add that later) this one is worth recommending:

http://books.google.is/books?id=G4dTRyvpfhoC

Though it is long it is not hard to read.

luismgl
January 4th, 2012, 10:40 AM
Thank you for all your suggestions, I will take them all into consideration :)
A friend of mine also recommended I took a read to this book since it has been sometime since I last programmed and that it will also help me study other languages, do any of you know this book?
http://www.amazon.com/Prelude-Programming-Concepts-Design-4th/dp/0321521757

Thanks.

w3develop
January 25th, 2012, 10:42 AM
First learn the basics of PHP and basics of MySQL. While learning MySQL, it is important that you also learn how to use PHP code with various MySQL commands / queries. PHP Tutorial (http://www.w3resource.com/php/php-home.php) and MySQL tutorial (http://www.w3resource.com/mysql/mysql-tutorials.php) of w3resource.com may be a good resource for that.

dazman19
January 25th, 2012, 11:59 AM
It depends what you want to make.

C++ is a good next step if you are confident with the C language. However I think you would have to write some pretty over the top code (in comparison to using python or php) if you were to design a web app in C++, it would run a lot faster, since its lower level but speed these days is neg especially when you are talking about web.

Python or php are both good options, if you choose python then you can cover more types of programs.

In my opinion PHP is actually better for the web. Heaps of people will dis-agree with me on this,(manly the python and perl lovers) but its just a lot simpler to get going and making a web app or site quickly. + the communities and forums will be full for web developers which know php.

If you want to write CGI's then go with python or C/C++. Python is great for CGI's. If you know C, then you can pretty much pick a path.

SeijiSensei
January 25th, 2012, 03:51 PM
Since you're just starting down this road, let me put in a plug for PostgreSQL (http://www.postgresql.org/about/) over MySQL. PG is more akin to enterprise databases like Oracle, conforms closely to SQL-2008 standards, and is not under the control of a commercial enterprise (again Oracle) like MySQL is.

Like Dragonbite, I also taught myself PHP and SQL by designing simple web applications. I started by building a simple address book application with the address data stored in a PG database. I'd had some experience with relational databases using Access, but that shields you from the nitty-gritty of the SQL language. Still it wasn't hard to figure out how to SELECT a person's record from the table or UPDATE a record with new data. Ultimately I wrote my own class library to handle basic DB tasks; this was before PEAR or any of the other libraries appeared to simplify such tasks.

As others mentioned, you'll end up having to learn HTML and probably some CSS styles so you can design the part of the application that users will see.

luismgl
February 7th, 2012, 10:03 PM
Thank you for you replies
I was at the library today actually (hence me seeing my own only topic a week after my last visit) and was reading the first 50 or so pages this book http://www.amazon.com/PHP-MySQL-Web-Development-4th/dp/0672329166 and it gave me a more clear idea of what I will be up against.

@SeijiSensei in this book they do make a reference about PostgreSQL and PHP native connectability to it. It could be interesting to try for the reasons you have stated and also because it seems to me to less known, so maybe the chances of finding someone who knows well about it are lower.

I abandoned the idea of learning C++ because I'm so conformable with C as I might have made it seem, also this will as well be my fist time teaching myself a programming language.

I do want to start with the very basics, best would be to find a book for complete novices since, as I said on the first post, its been over a year since the last time I have actually programmed.

I am right now giving w3schools.com a chance, thank you for the recommendation na5h

mörgæs
February 7th, 2012, 10:53 PM
Good. If this solved your problem, please mark the thread so.

Cookieh
February 7th, 2012, 11:02 PM
Before everything, learn HTML of by hard! Everything, if this would be online based programing, then I would suggest learning HTML, CSS, JavaScript and ASP before PHP but for programing purposes, I have started with really crappy batch programming and soon went on to Python and Pearl, both have same context as PHP, and both are as good. Only one problem I had was I did not find any books on how to "stitch" in C, C++,C# and Java in with PHP and Python. But mate, it is great that you are interested in C as it is a more objective language than PHP but go to www.w3schools.com this will help you a lot... :)

|{urse
February 7th, 2012, 11:08 PM
I find playing with a Drupal cms install in addition to a good tut or book helps teach you a lot about PHP. Every time I get elbow deep in a module or the internals I learn something new I didn't know was possible with this language.

SeijiSensei
February 7th, 2012, 11:23 PM
Before everything, learn HTML ... by [hand]!

I strongly agree with this. Start by installing apache2 and creating and viewing some HTML pages. Try using CSS styles to modify how the pages appear. For most web projects, I find it useful to think first about what the user will see and work back from there. Remember that whatever PHP scripts you write will ultimately be sending HTML and maybe CSS stylesheet(s) to the browser. So I recommend first becoming comfortable with designing HTML output before moving on to scripting. After you've written some basic scripts to handle user input, you can begin to consider attaching a database to the back-end to store user inputs and create dynamic content.


@SeijiSensei in this book they do make a reference about PostgreSQL and PHP native connectability to it. It could be interesting to try for the reasons you have stated and also because it seems to me to less known, so maybe the chances of finding someone who knows well about it are lower.

If you mean that becoming knowledgeable about PostgreSQL might improve your marketability, that depends on whether there's anyone using PG in your area of Portugal. I've always suspected there are a lot of people running commercial DBs like Oracle, Progress, and MSSQL that could convert to PostgreSQL and save all those licensing fees. Big enterprises won't do this, but smaller organizations who got sold on a commercial solution in the past might be open to change depending on what applications they are using. If you can keep the transition costs to a minimum, and eliminate the licensing fees, it could be worth it to switch.

|{urse
February 7th, 2012, 11:31 PM
Oh, missed the part where OP wasn't writing html by memory yet, +1 on that. Don't skimp on it! ^_-

luismgl
February 7th, 2012, 11:49 PM
Thank you for the awesome suggestions. I have now drawn a clear path of what I will do thanks to you guys.
w3schools.com does seems like an awesome place to start and I am paying attention to what they are teaching, although I'm the type of person that doesn't like to take one view and stick with it so I will browse for books for (X)HTML + CSS and further learn this as you all strongly pointed out and later move on to PHP and MySQL or PostgreSQL.


Seijisensei, improving my marketability in the future, was indeed my point. In these times of financial crises, people save wherever they can, so I believe the knowledge of a lower cost or free alternative to today's technologies would be a strong asset I could acquire.

On a side note, even though my profile says I'm from Portugal (which is true, I was born there and lived there until very recently) I am now living in Poland. I know that in Portugal most companies used MySQL, in here I believe the reality might be different, but I have yet to find a strong idea about it.

|{urse
February 8th, 2012, 01:11 AM
Actually, the link below was given to me a while ago and ever since I decided not to use them. Mind you I started learning there too (but just the basics, the rest was learned at Northern Oh Crap Figure It Out Now Or You're Not Getting Paid University.. good old NOCFIONOYNGPU).

http://w3fools.com/