PDA

View Full Version : Igniting the PHP


daehee
01-04-2004, 05:51 AM
Where is the best place to begin learning PHP?

I began looking at the manual at PHP.net, but they start to abruptly... I think that it wasn't meant for total beginners. So are there any tutorial sites or good books you recommend?

I am using pmachine as my blogging engine on my site right now... and I feel too restricted because I don't know how to modify any of the php code.

achtungbaby
01-04-2004, 08:40 AM
I am using pmachine as my blogging engine on my site right now... and I feel too restricted because I don't know how to modify any of the php code.It'd probably help to narrow down your focus: what are you trying to modify?

daehee
01-04-2004, 09:00 AM
I'd like to know what all the variables and code language actually means, so I can actually read the code that's going on my site. For example:

if (isset($HTTP_COOKIE_VARS['id']))
{
setcookie("id","",time()-60,"/","","0");
$HTTP_COOKIE_VARS['id'] = 0;
}

if (isset($HTTP_GET_VARS)) {
while(list($var,$val)=each($HTTP_GET_VARS)) {
$$var=$val;
}
}
if (isset($HTTP_POST_VARS)) {
while(list($var,$val)=each($HTTP_POST_VARS)) {
$$var=$val;
}
}
if (isset($HTTP_SERVER_VARS)) {
while(list($var,$val)=each($HTTP_SERVER_VARS)) {
$$var=$val;
}
}

Right now I have to download other people's scripts and use it. The first project I'd like to attempt is to make my own guestbook (or maybe even start with a simple shoutbox).

Obviously you've had a lot of experience with PHP, I'm guessing? Where'd you first start?

achtungbaby
01-04-2004, 09:16 AM
I'd like to know what all the variables and code language actually means, so I can actually read the code that's going on my site. For example:

if (isset($HTTP_COOKIE_VARS['id']))
{
setcookie("id","",time()-60,"/","","0");
$HTTP_COOKIE_VARS['id'] = 0;
}

if (isset($HTTP_GET_VARS)) {
while(list($var,$val)=each($HTTP_GET_VARS)) {
$$var=$val;
}
}
if (isset($HTTP_POST_VARS)) {
while(list($var,$val)=each($HTTP_POST_VARS)) {
$$var=$val;
}
}
if (isset($HTTP_SERVER_VARS)) {
while(list($var,$val)=each($HTTP_SERVER_VARS)) {
$$var=$val;
}
}

Right now I have to download other people's scripts and use it. The first project I'd like to attempt is to make my own guestbook.

Obviously you've had a lot of experience with PHP, I'm guessing? Where'd you first start?I have had a lot of experience fiddling with PHP, unfortunately, I forget most of it, like with practically everything else. However! I can tell you that making a guestbook from scratch would be a complete pain, considering there are plenty of good, open-source (free) PHP scripts available for that. I'd suggest picking up a book on PHP/MySQL, specifically on building content management tools. A good, simple one is Kevin Yank's "Build Your Own Database Driven Website"...you can purchase a copy at sitepoint.com

Oh yeah, re: above...the setcookie function is for creating and setting cookie variables, etc...

teaz0r
01-04-2004, 12:30 PM
i read kevin yank's book. from sitepoint.
Build Your Own Database Driven Website Using PHP & MySQL
By Kevin Yank
http://www.sitepoint.com/books/phpmysql1/

achtungbaby
01-04-2004, 12:32 PM
i read kevin yank's book. from sitepoint.
Build Your Own Database Driven Website Using PHP & MySQL
By Kevin Yank
http://www.sitepoint.com/books/phpmysql1/ For the amount of hype it seems to get, I was frankly expecting a little more. But it's not bad.