PDA

View Full Version : Learning PHP


Dalius
31 Oct 2001, 02:00
And Databases?

I only know how to install vB easily, but is their anything else I should know?

Kier
31 Oct 2001, 02:04
My first experience with PHP was vBulletin Lite... I pulled that thing apart until I understood every line of code, and that's what got me started :)

Dalius
31 Oct 2001, 03:17
Ack.... :stupid:

MrLister
31 Oct 2001, 03:34
hehe don't worry about it. kier used to program before that so that's why he took that step.


unlike kier i was not born with a "<?php" in my mind so i had to open a bood and read all those articles on the php dev boards and sitepoint.com... so i suggest you get a few beginner books from your library and experiment around with statements, queries, arreys, etc..

Sinecure
31 Oct 2001, 04:11
Yeah, Kier was born with if() statments instead of DNA :china:

Kier
31 Oct 2001, 04:21
Actually, I'm really a 3D artist by trade, I learned programming at university (studied computer visualisation & animation) and I really hated it... I just couldn't see the point of coding 3D applications when the ones that I can buy off the shelf are far and away better than anything anyone could write on their own...

Then I found PHP, and realised that finally I could do something useful and worthwhile with code, and the rest is history...

Well... when I'm not making a living from 3D anyway :)

Sinecure
31 Oct 2001, 04:23
Really, I had no idea Kier. Here I thought you were a Burns like figure coding PHP :D
I guess my portrait of you was for off?? Perhaps you have more the figure of Grounds Keeper Willie??

Kier
31 Oct 2001, 04:37
Nah, I'm a Burns-like CG figure :)

A few links to some of my recent projects:

1 (http://ap3d.com/kier/sdr/sdr1.jpg) 2 (http://ap3d.com/kier/sdr/sdr2.jpg) 3 (http://ap3d.com/kier/sdr/sdr3.jpg) 4 (http://ap3d.com/kier/sdr/sdr4.jpg) 5 (http://ap3d.com/kier/sdr/sdr5.jpg) 6 (http://ap3d.com/kier/sdr/sdr6.jpg) 7 (http://ap3d.com/kier/sdr/sdr7.jpg)

1 (http://ap3d.com/kier/thesquare01.gif) 2 (http://ap3d.com/kier/thesquare02.gif) 3 (http://ap3d.com/kier/thesquare03.gif) 4 (http://ap3d.com/kier/thesquare04.gif) 5 (http://ap3d.com/kier/thesquare05.gif) 6 (http://ap3d.com/kier/thesquare06.gif)

1 (http://ap3d.com/kier/squareR04.jpg) 2 (http://ap3d.com/kier/squareR07.jpg) 3 (http://ap3d.com/kier/squareR16.jpg) 4 (http://ap3d.com/kier/squareR46.jpg) 5 (http://ap3d.com/kier/squareR49.jpg) 6 (http://ap3d.com/kier/squareR85.jpg)

Sinecure
31 Oct 2001, 04:52
Okay, thats just plan amazing!!! It just blows me away, as I am trying to learn 3D progs right now.. What was that made in?

BTW, the first set of links didn't work :(

Bane
31 Oct 2001, 04:52
First row of links has /srd/ instead of /sdr/ :) Hella good work Kier.

Kier
31 Oct 2001, 04:57
Edited and sorted :)

Sinecure
31 Oct 2001, 05:00
Were you on the design team for Final Fantasy: The Spirits Within ?
That first set looks absoluetely real, thats amazing Kier. Great work. Not only could you write windowXP using PHP, you could make the nav as well!!:rolleyes:

afterlab
31 Oct 2001, 05:02
Wow.. Kier. I must say you are the elite of them all. And I thought you were ONLY the king of vBulletin Code Modifying. :rolleyes: :p

MrLister
31 Oct 2001, 05:15
Kier is too talented...... I get a headache just thinking of his talents. ;)

Mark Hensler
31 Oct 2001, 07:07
I'm a bit of the opposite of Kier. I started as a programmer, and my coursework has me taking some art classes. I hate art. I can't draw crooked stick figures.

I've had a semester of CADKey 98 and one of AutoCAD 2000. Next semester is 3D Studio MAX. I have no clue why the heck these are on my one major (CIS: Internet Web Design; the other is CIS: Systems Programming). Auto CAD was quite fun. I had a great teacher, who really made it interesting. I think I'll be having him for 3ds max, so I'm looking forward to it.

Anyway, it's interesting to see how people of one mindset somehow find there way into doing something else.

MrLister
31 Oct 2001, 16:07
:D i have to take art at school... i don't like it.. art=bad, php=good

JamesUS
31 Oct 2001, 20:24
I first started from a tutorial on SitePoint.com back last summer (June 2000 or so) - it was a fantastic tutorial by Kevin Yank, which has since been converted to a book.

If you can find a spare $35 (or whatever the book costs, not quite certain) then it is definitely 100% recommended - go to http://www.sitepoint.com and there are links there. The book is called 'Building a Database Driven Site Using PHP & MySQL" or similar.

FWC
31 Oct 2001, 21:09
Originally posted by JamesUS
If you can find a spare $35 (or whatever the book costs, not quite certain) then it is definitely 100% recommended - go to http://www.sitepoint.com and there are links there. The book is called 'Building a Database Driven Site Using PHP & MySQL" or similar. I ordered it last week. I am eagerly awaiting it's arrival. :)

Ruth
31 Oct 2001, 23:10
PHP & MySQL By luke Welling & Laura Thomson
MySQL By Paul DuBois

edit
Total List Price: $99.98
Buy Together Today: $68.23
You Save: $31.75
http://www.amazon.com/exec/obidos/ASIN/0672317842/ref%3Dnosim/searchbyisbn/104-5265327-7151934
/edit

wow, nice 3Ds Kier, btw how long do you take to design a 3D, and what is your favourite program for 3D? Studiomax, Bryce,... ?

MrLister
01 Nov 2001, 02:47
that book is really good! i'm still waiting for mine

apfeifer
01 Nov 2001, 02:50
I learned PHP basically just by guessing and checking, but I also own Core PHP Programming Second Edition, which I use to look up functions/etc that I don't understand or have a question about. It's a personal choice for which way you want to learn a language, websites, tutorials, books, whichever is easiest for you is the best way to do it.

:cool:

MrLister
01 Nov 2001, 03:25
Originally posted by apfeifer
I learned PHP basically just by guessing and checking, but I also own Core PHP Programming Second Edition, which I use to look up functions/etc that I don't understand or have a question about. It's a personal choice for which way you want to learn a language, websites, tutorials, books, whichever is easiest for you is the best way to do it.

:cool:
that's a good method.. i used to do that too

Syphin
02 Nov 2001, 01:40
Originally posted by Ruth
PHP & MySQL By luke Welling & Laura Thomson
MySQL By Paul DuBois


Ive got that as an E-Book on my PC... ^^

And Kier.. those images are awesome... I know ALOT of realy good designers... and i only know 1 that can do stuff like that... lol But he just left the net... O.o


-Syphin

Dalius
02 Nov 2001, 02:43
:(

Can we stay on topic please?

Palmer ofShinra
02 Nov 2001, 08:37
I learned PHP in a haphzard way... and am still learning.

It started when our board got hacked. Social engineered, actually.
And he took away all our admin's access.

All of our16 staff were admins, mainly because the Mod CP didn't have all the functions we needed.

And having 16 admins is a real security hole.

So... I took it upon myself to make things work better.

The key was to give them user profile editing but with limits...

So I figured.... this can't be too hard.
I don't know PHP... but I had taken 1 semester of intro Turbo Pascal back in HS 6 years back... so reading code shouldn't be THAT hard.
Syntax is syntax, right?
I could read it and figure out what did what...

Then I'd just copy/paste the edit user function from the admin CP into the Mod CP and edit out al the bits I don't want to allow.

Well... it was a bit harder than that.

But I read so much code it started to stick.

So... that post was a success. And the other staff were happy.

For about 5 minutes.

Then they needed feature-x from the admin CP... so I had to copy/paste the code for that over.
Then feature-y. And z.

Finally... there came a point where the Mod CP needed strictly limited usergroup editing.

This required more than copy/paste.

So I read the code... and learned the commands to send the query, as well as the right query.

I tried it... and it worked!

Now... I figured I had this usergroup part down...

So my next project was... figuring out how custom titles and avatars were controlled (requirements for use) and to change them to match some of our usergroups.

And that worked!

Now I needed to change everyone over ot the new usergroups and change their title status.... so ripping yet another example out of the vb source, I wrote my first standalone script... all it did was go through the DB, find everyone who has customtitle==1 and display them, with links to edit their profiles.

Now... i had this coding thing down...

So, using my trusty manual (http://www.php.net/manual/en) I set off... to write my own complex script which would automate many of our tedious tasks.

And I did it... in only 3 days.

Admittedly, the core was based around code snippets from the vb... but you know what they say about reinventing the wheel.

But over 95% of the code, and 100% of the concept, was original.

Thus was born my Automated Store (http://130.94.171.148/board/store.php).

Needless to say... both the members, and more importantly, the other staff, were floored and delighted by it.

And then came further tweaks.

I'm working on the simple, unified Points hack add-on now, which grew out of this.

Now the staff keep trying to find new things they want me to do for them.

Earlier today, I set it up so that people can have bbcode in their titles...

Basically... I learned by reading the code and working with it hands-on and using the manual as a reference to figure out how to do a few things, and how some things worked.

Mark Hensler
02 Nov 2001, 08:48
I learned Perl the same way Palmer learned PHP. My script of choice was the Ultimate Guest Book. I doubled the size of the admin .cgi file, and significantly enlarged one other file. I hacked that script into a beast. And guess what.. I don't use Perl anymore. =P

I honestly can't say that I know anyone who knows a language well enogh that they never have to look at the manual.. There are always those small things you want to double check. Like "Is it needle then haystack, or haystack then needle for in_array()?"

[BTW, for in_array() (http://www.php.net/manual/en/function.in-array.php) it's needle then haystack. Whereas in strstr() (http://www.php.net/manual/en/function.strstr.php), it's haystack then needle.]

Dalius
02 Nov 2001, 13:06
I don't know anything except for VB and QB...