Starting to learn PHP

  • 360Varial
  • Graduate
  • Graduate
  • 360Varial
  • Posts: 163

Post 3+ Months Ago

I've spent all week googling and trying to find a good explaination on databases. I'm totally lost.

I want to be able to build forums, guestbooks, newsletters, etc. PHP will allow me to do this right? So how does PHP and MySQL work together? And is MySQL a baby version of SQL. What exactly is Oracle? Sorry for all the newbie questions but I'd really appreciate your help. I would like for someone to explain databases and things to me. I've found a few articles but they were a bit difficult to understand. They always relate one thing to another and doesn't help when you don't know what either of the two are you know?

B_Heyer, you're always boasting about how great PHP is and how good you are at it. This should be a good one for you. You're the one who told me to learn it in the first place remember? :wink:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

Well, I suggest you go look at w3schools PHP tutorial. They have a pretty nice one, along with zend.
w3schools: http://www.w3schools.com/php/default.asp
For w3schools, you can go back to their home page and find some tutorials on SQL.
zend: http://zend.com/zend/tut/index.php
  • quantumcloud
  • Proficient
  • Proficient
  • User avatar
  • Posts: 456
  • Loc: Dhaka, Bangladesh

Post 3+ Months Ago

360,

Here is something I wrote for someone else few months ago, I will just quote. This might help you in some ways:

Quote:
First thing to do of course, is go to the mother site of PHP.
web:www.php.net

Download the help file documentation. You will need that through out your php career. If you are somewhat familiar with programming you will find that PHP is very easy to learn and use.

To write and test PHP code in your desktop you will need a web server, php engine, and CGI. If you wanna test a back-end database also, you will need MYSQL too. All of these are free. You can download them seperately from their respective web sites or you can get the PHP Triad. This is also free and includes all three you need to get up and testing PHP. Download this free from:

web:http://sourceforge.net/projects/phptriad

Install it on your computer. Write some php code on your notepad and save it in the c:\apache\htdocs\filename.php. Start apache and type web:http://localhost/filename in your browser. Voila...php is running.

A hello world php code may look like this:
<?php
echo "Hello World";
?>

Type this on your notepad and save in the c:\apache\htdocs\ as helloworld.php

Then start apache from start menu->programs and go to web:http://localhost/helloworld.php
from your browser.


A good book for offline reading on PHP is Beginning PHP4 by Wankyu Choi.

Amazon Site:
web:http://www.amazon.com/exec/obidos/tg/detail/- /1861003730/104-6342784-8695141?v=glance
Author Site:
web:http://www.wrox.com/books/0764543644.shtml
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

i learned php in like 3 days at least the basics i could make guest books, and edit what i wanted to be added, and know im maken band scripts such as members where u can edit things, shows where u can edit those and take them down when there over and lots of other things and i used a book and looked at clan scripts on how to work with database the book is 'PHP in easy steps'
its really nice it doesnt quite tell you how to make your own scripts it just shows you what u can do with php and how to make somethingsm and you just gota get creative and mess around with stuff to learn it, i always got php for dummies witch tells you how to make your own more than what u can do and its confusing to me but that just might be cuse im 14 :D but look around
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

SpooF, please consider learning English your next language, you could really use
some work on your grammar.

As for what to do to learn it is really to just come up with a few things you want to do
and start at it. Start small though, a counter, a quiz, a guestbook. Then look up
functions in the php.net documentation. php.net has a starting tutorial on it to get you
started.

As for your questions:

Yes, PHP will allow you to do that, but don't waste your time with a forum, use phpBB
unless you need something really insecure and just for people to post quick
messages (basically a multi entry guestbook).

PHP and MySQL work together with a series of functions, which can be found
here: http://www.php.net/manual/en/ref.mysql.php . Those functions are all used to
query the database, and manipulate the results of those querries.

I really couldn't tell you the differences between MySQL and SQL.

No idea on that one either.

Databases hold data! You can organize the data how you want, etc. I'd
recommend reading the documentation at http://www.mysql.org

Ozzu is a great place to ask questions on this stuff, so if you ever get stuck, just
post! :-D

(Oh, and don't think so highly of me, I just love what I do!)
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

b_heyer wrote:
I really couldn't tell you the differences between MySQL and SQL.


Well, SQL is structured query language, the stuctured language you use to query a database (clever how they named that).

MySQL is an actual database (or database system whatever the terminology is)

Therefore, MySQL is not a baby version of SQL. They are completely different things. MySQL is closer to M$ Access than SQL
  • 360Varial
  • Graduate
  • Graduate
  • 360Varial
  • Posts: 163

Post 3+ Months Ago

I keep trying to convince myself that I don't need to know what's going on under the hood of a car in order to learn how to drive it. Then I try to relate that to learning PHP. But I don't think it's the same. I really want to understand MySQL and SQL a wee bit more before I skip to learning PHP.

See if I'm halfway there:

SQL is the actual language used to WRITE a database?

SQL is like the HTML you use to build a page. MySQL is a database MANAGEMENT system, so it helps you monitor/control SQL databases? It makes it easier to work with and gives you more options...? Just like Dreamweaver, in a way, can be used to control an html page and spice it up a bit....? Dreamweaver/MySQL = software/management tools...HTML/SQL=actual code...???

Is PHP more visual? It provides the user with what they see on the page. Then it tells MySQL what the user wants. Then MySQL uses SQL to interact with the information stored in the database, which is stored on an Apache server. The server processes all of this data and sends it back the way it came in and VOILA! Right back to the user's browser?

lol That may sound weird to you pros, but so far that's the understanding I'm getting.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Thats pretty close and good enough to work with - you'll pick up more as you go along. Don't expect to understand everything at once - with stuff like this practice will show you how things work. Just keep going.

BTW the analogy with the car is not quite right:

You don't need to know whats going on under the hood of a car to drive it, but you do if you want to build one.

You don't need to know whats going on behind the scenes of a PHP/MySQL website to use the site, but you will if you want to build one.

Not 100% accurate but thats roughly how I see it.
  • 360Varial
  • Graduate
  • Graduate
  • 360Varial
  • Posts: 163

Post 3+ Months Ago

rtm223 wrote:
Thats pretty close and good enough to work with - you'll pick up more as you go along. Don't expect to understand everything at once - with stuff like this practice will show you how things work. Just keep going.

BTW the analogy with the car is not quite right:

You don't need to know whats going on under the hood of a car to drive it, but you do if you want to build one.

You don't need to know whats going on behind the scenes of a PHP/MySQL website to use the site, but you will if you want to build one.

Not 100% accurate but thats roughly how I see it.


lol Yeah. You're right. That makes more sense. :lol:

Thanks everyone for helping. I think I'm ready.
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

You can always ask some of us more-experienced php'ers for help if you ever need it.

But stay away from downloading programs from sites like hotscripts and etc for use on your site. Necessity is the mother of all invention. I think the only true way for you to learn php is for you to try to build whatever you need. Over time, you'll need it more and more and you'll become more and more proficient. Good luck.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

gsv2com wrote:
You can always ask some of us more-experienced php'ers for help if you ever need it.

But stay away from downloading programs from sites like hotscripts and etc for use on your site. Necessity is the mother of all invention. I think the only true way for you to learn php is for you to try to build whatever you need. Over time, you'll need it more and more and you'll become more and more proficient. Good luck.


damn right. The number of people who post questions because they have just fiddled with a script they don't understand, broken it, and are too lazy to actually learn anything themselves. Then some nice person replies <i>"use so-and-so technique"</i> and then the asker of the question says <i>"but I don't know any PHP - I d/l 'd the script from hotscripts"</i> and then some <b>really</b> nice person re-writes the code for them so it works, the question asker says <i>"thank you"</i> and they have learned NOTHING. The chances are they don't even look at the corrections that were made. Next time they download a script they just go through the exact same process again.

Sorry, just getting that off my chest, it's not an attack at anyone in particular. And I'm <b>definately</b> not saying don't ask questions. Thats what this place is about after all. I'm happy to answer anyone's questions if I know the answer, but I don't like lazy people who use others and take advantage of the good nature of some of the fine people on this forum.

Yeah just build little scripts, do some tutorials, if you can justify the cost of a good book, get one. Then maybe once you have got some practice, d/l some scripts and <b>take them apart</b>. Never just plug a script into your site. I would never use a script that I didn't understand. Well maybe something like phpBB, but I'd sill try to understand as much as possble. It worries me to not be in control, because I am a crazy control freak :lol:
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

phpBB is kind of a different story altogether. Even the most experienced php'ers know that phpbb is an excellent forum script. I'm sure bigwebmaster and others could build their own forums if they put the time into it, but for the purpose it serves, it's easier (and probably better) to just install phpbb.

I've actually spent a bit of time developing my own forum (http://www.japanupdate.com/forums) as kind of a side project in hopes that one of these days it'd be half as powerful as phpbb. It's a one table script, and it's quite fast. Building it taught me a lot about php as there were ENDLESS puzzles to be solved.

But what doesn't kill you only makes you stronger and I've become a better coder due to some of the projects I've had in the past.

The forum I built hasn't been updated at all in over a year. I've learned a lot since then and plan on doing an overhaul.

That's the lifestyle of programming. You build the original 1.0, learn a bit about coding and think up new features and possibilities, you add them, out comes 2.0, you learn a bit more about coding, you think up new features and possibilities, you add them, etc, etc.

Good luck to all of you php-newbies. It might be difficult--especially if you've never had any formal training in programming, but it is possible to learn. You WILL have to learn to appreciate books.
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

rtm223 wrote:
The number of people who post questions because they have just fiddled with a script they don't understand, broken it, and are too lazy to actually learn anything themselves. Then some nice person replies <i>"use so-and-so technique"</i> and then the asker of the question says <i>"but I don't know any PHP - I d/l 'd the script from hotscripts"</i> and then some <b>really</b> nice person re-writes the code for them so it works, the question asker says <i>"thank you"</i> and they have learned NOTHING. The chances are they don't even look at the corrections that were made. Next time they download a script they just go through the exact same process again.

Without a doubt, this is one of my biggest pet peeves. When I try to help somebody, I try to give information on how to get scripts working, but I don't give the whole re-vamped script. My tutorials are more like:

you can change this:

Code: [ Select ]
code goes here


into this

Code: [ Select ]
code goes here


:lol:

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 67 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.