PHP & MySQL - What does it mean?

mudd0gg

New member
Hi all,

I've just started to study PHP & MySQL, and I'm struggling to understand what it all means. I've tried re-reading lecture notes, looking at various websites for explanations.

From what I gather, php is an embedded language which goes into html, but the only reason I can think of as to what its purpose is, is to stop users from seeing parts of your code?

Also, MySQL - A type of code used for databases like Microsoft Access, just as LaTeX and UNIX have their own special code?

If anyone could shed some light on these two subjects, and why it is said that they compliment each other so - IN LAYMAN'S terms, it would be much appreciated.

Many Thanks!
 
Laymans terms.. ok here we go!

HTML is used to make what you see on a webpage (in conjunction with other things) but it cannot process forms or take variables or anything like that. so enter PHP. it is a programming language that runs server side to do computations from HTML. when you fill out a form and hit submit in HTML chances are its sending that information to a PHP script to compute something (though it could be PERL or ASP).

in a very basic example, say you wanted to let a user type their name in and have that name flash across the screen. PHP lets you store the name they type in in a variable and then recall that variable and display it. you could not do that in simple HTML.

mysql is a databasing language that creates databases to store information. PHP goes hand in hand with it because it is easy to integrate. a common example is forums. when you sign up all your information is stored in a table in mysql and PHP is used to process it. any post you make ona forum is then stored in the database, and you can retrieve it when you wanna view a thread.


it is true you cannot see PHP by viewing the source of the page, it is embedded, as you say. information from a html form is sent to a php script, but then the script sends soemthing back after processing, and that is displayed in another html page.
thats not to say that you cannot use php to format a page, but it is long winded and you generally end up expressing html tags through php, which is just pointless.


hope all that helps!
 
Back
Top