Ok i as i have mentioned in my other post i have just started out with PHP and i can make a simple html form that can take info in and add it to a mySQL database using php... i can write php that uses html to display the complete database table in an html table.
But how do i actualy go about incorporating that into a good looking web page....
For example my show_student_table.php shows a white background with a simple grid on it containing the data.. if i wanted to use that on my home page would i place the html that makes it look nice within the php or some how pipe the results of the php to an html page for displaying?
I hope it actualy makes sence what im asking?
html in php or html that uses php ?(super n00b question)
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Since you're obviously learning from scratch learn CSS. You have a big advantage that you're new to it. CSS is the best way to acheive what you need and some developer's who've been using other methods for a long time sturggle to adapt to it. You wont have that problem.
http://spoono.com in my sig has some tuts. Also http://webmonkey.com and http://w3schools.com/css
No need to learn how to use it with PHP at first, just learn how to make static pages then adapt it for use with PHP
EDIT | I forgot http://alistapart.com/ -> excellent for experts too
http://spoono.com in my sig has some tuts. Also http://webmonkey.com and http://w3schools.com/css
No need to learn how to use it with PHP at first, just learn how to make static pages then adapt it for use with PHP
EDIT | I forgot http://alistapart.com/ -> excellent for experts too
Last edited by Chris Corbyn on Tue Jul 26, 2005 2:58 pm, edited 1 time in total.
Most beginners start out placing <?php ?> blocks within their html so stuff like
Is a fine starting point. Eventually most people move to templating systems and/or html generators. Templating systems tend to follow the same system as above, but make it easier to maintain/switch styles,etc. HTML generators work by always being in PHP mode and printing/echoing/building up a string with the whole page. All methods are "valid" and appropriate depending on your project.
Code: Select all
<html>
<head>
<title>Foo</title>
</head>
<body>
Stuff and Junk
<?php
do some stuff
?>
Good Bye
</body>
</html>