Connecting Tech Pros Worldwide Help | Site Map

PHP Learning suggestions...

Jason
Guest
 
Posts: n/a
#1: Jul 17 '05
Hello everyone.

I have been given the task of working with PHP and MySQL at my company,
to development some methods for our future use. The problem is, I have
very little experience with PHP, and I need to figure out a way to
quickly work with PHP and MySQL.

Here is what im going to be working with.

I need to develop a PHP web page, that will contact the MySQL database
on the server and return specific pieces of information; rows, tables
etc. However, i'm not sure how to get started with this.

I know some basics with PHP (I do use Perl for Sys Admin, so some of the
concepts are similar).

But, can anyone recommend some books, links, tutorials etc. that can
help me get started with this project?

It seems daunting, but I think I just need to get started with it, and
it will eventually be easy, with time.

I appreciate it

Jas
Guest
 
Posts: n/a
#2: Jul 17 '05

re: PHP Learning suggestions...


> I know some basics with PHP (I do use Perl for Sys Admin, so some of the[color=blue]
> concepts are similar).[/color]

Well, you are ok then... you know a little PHP and you use Perl. If you are
strong on Perl you will have no problem with PHP.
I can't recommend a PHP book to you ask I have two and they are not good to
me... but that is just me because I only have on programming book I actually
like and feel was well written for a programmer that is not a novice.

My suggestion is get the PHP reference book. It gives you all the PHP
features, commands, and even some config info. It is pretty good... Not the
end all be all, but good for general use. I do suggest get you get a book
like one of those cookbook series. I don't know if there is a PHP offering
there, but check it out. I only say this because I think project based
learning is good for you at this point.

My best advice, go to sourceforge or search on the net for free code.
Install something like the Web Based phpMyAdmin . Go into the code and pick
it apart. Change something, break it, fix it.
This is the only way to actually dive in and learn it. I guarantee this
method is better than reading books. I promise.

Good luck to you.

--
Wil Moore III
www.digitallysmooth.com


Pedro Graca
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PHP Learning suggestions...


Jason wrote:[color=blue]
> Hello everyone.[/color]

Hi Jason.

(snip)[color=blue]
> I need to develop a PHP web page, that will contact the MySQL database
> on the server and return specific pieces of information; rows, tables
> etc. However, i'm not sure how to get started with this.[/color]

Is this for a internet/intranet application?
Do you have a webserver running?
PHP and MySQL properly installed and configured?
[color=blue]
> I know some basics with PHP (I do use Perl for Sys Admin, so some of the
> concepts are similar).[/color]

You can do Sys Admin stuff with PHP too :)

Beware with operator precedence ... the "or" and "||" (and maybe "&&")
are different from the Perl ones.
[color=blue]
> But, can anyone recommend some books, links, tutorials etc. that can
> help me get started with this project?[/color]

http://www.php.net/

If you need to check a function there's a real nice shortcut for its
page: just type the function name after that URL above, like this

http://www.php.net/mysql_connect
[color=blue]
> It seems daunting, but I think I just need to get started with it, and
> it will eventually be easy, with time.[/color]

I think so to :)

Here's a short script to list all users defined for your MySQL
installation:

========
<html>
<head>
<title>User's List</title>
</head>
<body>
<p>User's List</p>
<table border="1">
<?php

define('DB_HOST', 'localhost');
define('DB_USER', 'username');
define('DB_PASS', 'password');

// connect to the database server
$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());

// execute query
$sql = 'select user, host from mysql.user';
$result = mysql_query($sql) or die(mysql_error());

// print results
while ($row = mysql_fetch_row($result)) {
echo '<tr><td>', $row[0], '</td><td>', $row[1], "</td></tr>\n";
}

// free resources
mysql_free_result($result) or die(mysql_error());
mysql_close($conn) or die(mysql_error());

?>
</table>
</body>
</html>
========


--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jon Beckett
Guest
 
Posts: n/a
#4: Jul 17 '05

re: PHP Learning suggestions...


On Thu, 27 May 2004 11:44:01 -0700, Jason
<jwilliams@courtesymortgage.com> wrote:
[color=blue]
>I know some basics with PHP (I do use Perl for Sys Admin, so some of the
>concepts are similar).
>
>But, can anyone recommend some books, links, tutorials etc. that can
>help me get started with this project?[/color]

There is a pretty good book from O'Reilly that covers both PHP and
MySQL - from memory I think it has a duck billed platypus on the
cover.

I used it to get started, and used the MySQL and PHP online
documentation heavily too. The PHP online stuff is great actually
because of the user comments.


kingofkolt
Guest
 
Posts: n/a
#5: Jul 17 '05

re: PHP Learning suggestions...


"Jason" <jwilliams@courtesymortgage.com> wrote in message
news:10bcdmhaqperv10@corp.supernews.com...[color=blue]
> Hello everyone.
>
> I have been given the task of working with PHP and MySQL at my company,
> to development some methods for our future use. The problem is, I have
> very little experience with PHP, and I need to figure out a way to
> quickly work with PHP and MySQL.
>
> Here is what im going to be working with.
>
> I need to develop a PHP web page, that will contact the MySQL database
> on the server and return specific pieces of information; rows, tables
> etc. However, i'm not sure how to get started with this.
>
> I know some basics with PHP (I do use Perl for Sys Admin, so some of the
> concepts are similar).
>
> But, can anyone recommend some books, links, tutorials etc. that can
> help me get started with this project?
>
> It seems daunting, but I think I just need to get started with it, and
> it will eventually be easy, with time.
>
> I appreciate it
>
> Jas[/color]

A couple books I read to get myself started with PHP/MySQL:

SAMS Teach Yourself PHP in 24 Hours, by Matt Zandstra
(http://www.samspublishing.com/title/0672326191)
SAMS Teach Yourself MySQL in 24 Hours, by Julie Meloni
(http://www.samspublishing.com/title/0672323494)

They give you a good foundation in PHP/MySQL, definitely enough to get you
started with what you're doing.

- JP


Larry Jaques
Guest
 
Posts: n/a
#6: Jul 17 '05

re: PHP Learning suggestions...


On Thu, 27 May 2004 11:44:01 -0700, Jason
<jwilliams@courtesymortgage.com> stated wide-eyed, with arms akimbo:
[color=blue]
>Hello everyone.
>
>I have been given the task of working with PHP and MySQL at my company,
>to development some methods for our future use. The problem is, I have
>very little experience with PHP, and I need to figure out a way to
>quickly work with PHP and MySQL.
>
>Here is what im going to be working with.
>
>I need to develop a PHP web page, that will contact the MySQL database
>on the server and return specific pieces of information; rows, tables
>etc. However, i'm not sure how to get started with this.
>
>I know some basics with PHP (I do use Perl for Sys Admin, so some of the
>concepts are similar).
>
>But, can anyone recommend some books, links, tutorials etc. that can
>help me get started with this project?[/color]

Any book by Julie Meloni. She has a good, clear, easygoing style.
I started out with her first book, "PHP Essentials". It's in its
second edition now. $24.50 here:
http://www.bookpool.com/.x/7wx7a43mt...PHP+essentials

I'm now starting her "SAMS Teach Yourself PHP, MySQL, and Apache in
24 Hours" in my spare time.

[color=blue]
>It seems daunting, but I think I just need to get started with it, and
>it will eventually be easy, with time.[/color]

It is, then you get started and it gets easier...Until it turns 10pm
and your project is promised the next day and the very last session of
code _doesn't_quite_work_... DAMHIKT ;)

--
Life's a Frisbee: When you die, your soul goes up on the roof.
----
http://diversify.com Comprehensive Website Development

Steven Stern
Guest
 
Posts: n/a
#7: Jul 17 '05

re: PHP Learning suggestions...


On Thu, 27 May 2004 11:44:01 -0700 (more or less), Jason
<jwilliams@courtesymortgage.com> wrote:
[color=blue]
>Hello everyone.
>
>I have been given the task of working with PHP and MySQL at my company,
>to development some methods for our future use. The problem is, I have
>very little experience with PHP, and I need to figure out a way to
>quickly work with PHP and MySQL.
>
>Here is what im going to be working with.
>
>I need to develop a PHP web page, that will contact the MySQL database
>on the server and return specific pieces of information; rows, tables
>etc. However, i'm not sure how to get started with this.
>
>I know some basics with PHP (I do use Perl for Sys Admin, so some of the
>concepts are similar).
>
>But, can anyone recommend some books, links, tutorials etc. that can
>help me get started with this project?
>
>It seems daunting, but I think I just need to get started with it, and
>it will eventually be easy, with time.
>
>I appreciate it
>[/color]


I started using ezSQL to wall off the SQL stuff in easy to use objects
(http://php.justinvincent.com/). My first book was Cosentino's Essential PHP.
The most helpful thing about it was that the examples didn't work on my system
(because it assumes all globals are enabled). Thus, I had to study and
reworked every example to get going. I really like Scholossnage's Advanced
PHP.

But what got me going was writing a few very small apps that drove web pages
from a very simple database, displaying (or not displaying) text based on the
date.
Jason
Guest
 
Posts: n/a
#8: Jul 17 '05

re: PHP Learning suggestions...


Thanks everyone. I appreciate your feedback and suggestions.

What im doing right now, is using a PHP book for reference, and just
writing code. I'm using the Zend tool right now, as I am still learning
the syntax and all the other goodies. I just think that if I can get a
handle on the basics of PHP, i can start writing some applications, talk
to databases etc. which should really help me out...

Right now, just trying to wrap my head around some of the stuff, but so
far, it appears to be going well.

I will keep everyone posted

Jason
Brandon Blackmoor
Guest
 
Posts: n/a
#9: Jul 17 '05

re: PHP Learning suggestions...


Larry Jaques wrote:[color=blue]
> Jason <jwilliams@courtesymortgage.com> wrote:
>[color=green]
>> can anyone recommend some books, links, tutorials etc. that
>> can help me get started with this project?[/color]
>
> Any book by Julie Meloni. She has a good, clear, easygoing style.
> I started out with her first book, "PHP Essentials".[/color]

I'll second that recommendation. You may also want to take a look at

http://dmoz.org/Computers/Programmin...PHP/Tutorials/

bblackmoor
2004-06-04
Closed Thread