PDA

View Full Version : New to PHP


RevKev
05-10-2001, 08:43 PM
I just started reading a book on PHP in an attempt to learn how to do it myself. It brings me to two questions, though, that I have been unable so far to find answers to in the FAQ or on this forum.

1) I am assuming we can use the "short styles" for PHP tags. Is this true?

2) Are the servers here at HR set up for PHP to use the "mail ()" command? (The book I am reading seems to think this may be a problem with some servers). Specifically, can I use PHP with a form to have the form contents emailed to me?

3) Is there a webpage at HR that would tell me stuff like this? The FAQ says to go to http://hrws1.net/, but it gives me an internal server error. Is this because the FAQ is old, or it just isn't working today.

4) Finally, the book I am using was bought for me by the people funding my website (who, by the way, have never coded anything or ever put up any type of a website). It is "PHP and MySQL Web Development" published by SAMS. If anyone else out there has read it, can you tell me what you thought of it, is it a good learning tool, or am I only going to get myself in more trouble with it? :)

Thanks,
Rev. Kevin Hartwig

MauriceToo
05-10-2001, 08:55 PM
Dear RevKev:

There was another string of posts of the subject of resources to learn PHP/MySQL (http://forums.hostrocket.com/showthread.php?s=&threadid=2083). Several among us gave our views on good/bad/okay resources to learn PHP/MySQL. I don't think the one to which you're referring was mentioned, but that's not to say it's bad.

In response to your other questions:

1. Yes, you can use short style à la <? ... ?>.

2. Yes, the mail() command works at HR.

3. No, unfortunately, the best way to figure these things out are trial and error, checking alternate resources (e.g., http://php.net , where you might here of workarounds for bugs), and asking on this board.

Indeed, the HR Community is often a great way of getting answers quickly about how the HR servers are configured ...and if that fails, well, a good ol' trouble ticket could be in order!

Cheers! :)

superunison
05-14-2001, 12:19 PM
Another thing which I've found useful:
try creating a PHP script which contains only the following function call:

<?php
phpinfo();
?>

the resulting script has a whole lot of information about the PHP build on the server. it's pretty cool too.

chris

FreshFroot
06-02-2001, 12:20 AM
Nice to hear about people learning php. I'm a newbie too. I picked up the book that you have and ended up taking it back and picking up two others that have been a great help. The first is SAM's Teach Yourself php in 24 Hours, it's basic (but a bit more than the program than the PHP Dev book that you have) but it's structured...which works for me. The other is Wrox Beginning php4. It's a bit more "technical", but after completing the 24 Hours book you'll be on your way.

This php thing is a ton of fun. Enjoy it!!!

delemtri
06-10-2001, 02:40 AM
I'd personally recommend devshed.com, I have a fully functional (well... not quite fully, haha) site up using tons of PHP, and I got almost all of it from devshed.com. also useful is PHP's own site, php.net

MX3D
06-10-2001, 05:04 AM
On the whole subject on PHP, do you need to know HTML to know PHP? Which should I learn first?

delemtri
06-10-2001, 09:42 AM
I'd say learn HTML first, but only because it's far more simple. Also a lot of PHP's cool functionality comes from CGI forms, and you need to know HTML to write them.

JordanTLClive
06-10-2001, 05:53 PM
One of the most powerful features of PHP is its ease of interactio with MySQL. I highly reccomend you go to http://www.webmasterbase.com/article.php/228 and read that article ("Building a Database Driven site with PHP and MySQL"). Also, a good place to get help is at www.sitepointforums.com, go to the Server Side Internet Development category and there is a section called PHP and MySQL, lots of people there to help you out and tons of questions already answered.