Some questions regarding learning PHP, and using PHP-writing software

I’ve made abortive starts on learning PHP before, but now i would really like to put together a relatively small dynamic site, and so am ready to try again. What i’m trying to put together is a guide to certain websites, and i would like visitors to my guide to be able to search for sites based on criteria like region or country, time period, subject matter, etc.

Setting up the information in a MySQL database shouldn’t be too difficult. It won’t be a massive database (maybe a couple of thousand entries, at most). I still need to think about the exact layout, relationships, etc. that i want in the database itself. What i want is for people to be able to search using the types of criteria mentioned above, and for the results to appear in tabular form, with one result per table row.

Writing the HTML for the results pages will be fairly straightforward; i just need to become familiar enough with PHP to allow me to create the search forms, send the queries to the database, and output the results in the format described. I realize that this is not trivially easy, but i’m not in a rush, and am willing to take some time and effort to do it properly.

So, a couple of questions.

First, do you think that a site like this is beyond the reach of someone who is teaching himself PHP through books and online tutorials? That is, can i only succeed if i go and get someone to teach me?

Second, does anyone have any experience with software that writes PHP code for you? For example, i found something online called PHPMagic, which claims to enable the user to implement PHP/MySQL web applications without any actual knowledge of PHP. Is something like this a reasonable solution for someone like me, or is it likely that it will be a poor substitute for learning how to do it all myself? (Of course, i could just download the trial and give it a go, but if anyone has any experience with this sort of software, i’d love to hear it.)

Finally, any other advice for someone starting on a project of this sort?

I had a good XHTML/CSS background before trying to learn PHP, and I learned it by reading PHP For Dummies and hacking apart a few open source projects and making them work for me. I now do a TON of freelance PHP work and even have taught a few college classes on it.

I’ve never heard of PHPMagic, but now I think I’ll take a look at it… anything that makes my job easier and faster is okay with me.

I think that’s a great project for starting to learn database-driven Web programming. Anything that gets you using well-planned database structure and performance-enhancing code is great.

As for using a program to do it for you…it will only help if you have complete access to the resulting code. If you use Dreamweaver as an HTML editor and you never look at the HTML, you haven’t learned HTML. Same goes for any code. Breaking apart code snippets, as wasson suggests, is how I learned (not PHP but ASP). If you can get a program to spit out code snippets and then you learn how and why it worked by looking at the code, that’s pretty cool I think.

I have Dreamweaver, but virtually all of my coding is done by hand, either in Dreamweaver or in Homesite. I do my best to make good use of CSS, so i find it easiest to write the CSS first, based on the layout that i want, and then write the HTML by hand, incorporating the CSS styles. I’m still no guru with CSS, and i still find some of the cross-browser hacks a pain in the ass, but i’m getting better all the time.

I’m glad to hear that you think this is a good project to start with, and i certainly agree about the benefits of looking at code in order to work out what it does. That strategy really helps me with my CSS. It’s especially useful with PHP, i think, because i find that the examples used in some of the instruction books aren’t always terribly easy to grasp just by reading the book, and seeing them in action and then breaking them down will probably make things easier.

I’m going to do some more reading on PHP, and try some examples. After that, once i think i’ve got a handle on some of the basics, i might install PHPMagic and see if the code it produces can teach me something.

mhendo, I’m in the same place as you - I am trying to teach myself PHP. In fact, I just started reading a book on it last night: Beginning PHP5, Apache, and MySQL Web Development. So far it seems like a good resource… it walks you through two real projects step-by-step, and both project web sites are similar to the one you want to make, so I think this may be a good book for you.

As for me, I started to get interested in PHP after using three open-source applications written in PHP - Wordpress (blog), Coppermine (photo gallery), and PHPGedView (genealogy database). I delved into the guts of these programs so I could customize how they looked and make them seamlessly integrate into the design of my web site, so I got a good basic view of how PHP worked. And now I want to learn it for myself. I’m determined and excited, but a little bit intimidated… but I figure, I taught myself HTML and CSS, so I should be able to learn this too.

Good luck!