PHP & HTML Interrelationship (1 Viewer)

Steve R.

Retired
Local time
Today, 10:14
Joined
Jul 5, 2006
Messages
4,619
Currently, I have a very ultra primitive webpage for my Science Fiction Magazine Database. I recently got the book "PHP, MySQL, & JavaScript". I successfully wrote (how about copied) the PHP code for logging into MySQL and undertaking a simple data dump. Now I am experimenting with the webpage design.

I get the impression that PHP is principally for interacting with MySQL (or other database) and not really meant for webpage design. But then there is this book: PHP Solutions: Dynamic Web Design Made Easy. My question: Do I need to use HTML to design the webpage?

I am looking at getting this book: Beginning HTML, XHTML, CSS, and JavaScript for the webpage design. Any thoughts?
 

Banana

split with a cherry atop.
Local time
Today, 07:14
Joined
Sep 1, 2005
Messages
6,318
HTML = "HyperText Markup Language"

IOW, HTML is NOT a programming language. It merely describes how to present a document by specifying the positions and formatting along other things.

So... if you used nothing but HTML, you get a static page. How, then, do you get dynamic stuff such as dropdown list or update a frame or so? That's where PHP, JavaScript, Perl, CGI, ASP, ASP.NET, AJAX and many other technologies comes in the picture.

But at the end of day, all those programming languages basically emit HTML for you to provide the actual content- by using some method of communication (in PHP that's $POST), it can update some content of page without you needing to maintain an actual copy of HTML.

Did that help?
 

Steve R.

Retired
Local time
Today, 10:14
Joined
Jul 5, 2006
Messages
4,619
Yes that's my question, HTML is used for designing, not programing. PHP appears to be the programming interface. Actual interaction with MySQL would be through PHP, the programming language. So the conclusion would be that I need to get an HTML book to design the webpage.
 

Banana

split with a cherry atop.
Local time
Today, 07:14
Joined
Sep 1, 2005
Messages
6,318
No, I wouldn't put that way.


It is possible to not have any HTML at all and have PHP generate HTML for you completely, which was what I was trying to point out. The more likely setup, though, is that you would have a collection of HTML snippets definitions for your headers, sidebars, navigations, and some common images. Whatever. PHP can then be used to assemble them together into a single dynamic HTML page and when a user navigate to a page in a frame for example, it only need to replace HTML within that page rather than the whole HTML. So you certainly can use PHP to design websites especially if you want dynamic contents but in the end result, it outputs HTML just in the time. Note further that not all functionality are provided by HTML- JavaScript or AJAX does some stuff (e.g. a dropdown list would probably be driven by a JavaScript or AJAX for example)

HTH.
 

Steve R.

Retired
Local time
Today, 10:14
Joined
Jul 5, 2006
Messages
4,619
Thanks for the clarification. Now I have a much clearer mental picture of how all of this goes together. Chapter 20, of the PHP book I bought, seems to get into what you are saying. But then I haven't gotten that far into the book yet. Still have a lot to learn. One step at a time.
 
Last edited:

pono1

Registered User.
Local time
Today, 07:14
Joined
Jun 23, 2002
Messages
1,186
Adding to the fun...if you have prior programming experience, PHP 6 and MySQL 5 is, in my opinion, a pretty good book on PHP...

I may be off-point, here, but simply knowing HTML will not necessarily make your web site visually appealing (and simple to navigate). You will want to search around for a graphic design book, one that focuses on web page design if you're looking to improve the visual side of your web pages.

Regards,
Tim
 

Steve R.

Retired
Local time
Today, 10:14
Joined
Jul 5, 2006
Messages
4,619
Adding to the fun...if you have prior programming experience, PHP 6 and MySQL 5 is, in my opinion, a pretty good book on PHP...

I may be off-point, here, but simply knowing HTML will not necessarily make your web site visually appealing (and simple to navigate). You will want to search around for a graphic design book, one that focuses on web page design if you're looking to improve the visual side of your web pages.

Regards,
Tim

I know zip concerning webpage development. What I have is a LINUX computer running Ubuntu connected to a home LAN. So I am planning, at this time, a bare bones webpage to connect to MySQL. I am making the webpage connection with a WindowsXP computer - so far so good.

I think my major hurdle will be developing the MySQL queries and the PHP interface. Again, I know very little on how do this, but I will keep on reading.

Once I get over the MySQL and PHP learning curve and get something remotely functional, I can focus on HTML enhancements should I need them.
 

polardhanry

New member
Local time
Today, 07:14
Joined
Apr 14, 2010
Messages
3
PHP stands for Pre-hypertext pages.It is server sided language and providing some security and HTML stands for Hypertext Markup language.Whenever you want some statics page HTML used and make dynamic page PHP used.
 

Users who are viewing this thread

Top Bottom