html template

brsawvel

Registered User.
Local time
Yesterday, 22:05
Joined
Sep 19, 2007
Messages
256
hello all,

It may sound like a simple question, but I'm very new to this...I'm considering buying a web template and was wondering if an html page can have code (php?) written into it to retrieve information from a database?
How would that work? Can I just save the edited file with the new code or save the file as one other than .htm? Or would I have to start with a webpage that is already developed to take the necessary code? (Or what do I do?)
 
Hello,

Yes you can insert php into any html page.
example..
<body>
<h1>Hello this is my webpage...</h1>
<p> Here is my content...</p>
<?PHP> INSERT PHP SCRIPT TO RUN BETWEEN THE "php" tags</PHP>
<p>And that is how you do it!</p>
</body>

Of course you need to have a server that supports PHP.

HTH.
DanG
 
<?PHP> INSERT PHP SCRIPT TO RUN BETWEEN THE "php" tags</PHP>

The tags shouls be <?php (opening tag and ?> (closing tag)

Also you need to save the file in .php extension
 
Oops!
I got so carried away with the HTML tags, I just kept it going :o
 
I guess one important thing you should know is that PHP is processed on the Web Server, not on the presentation machine (i.e. client). It is like asp and jsp in that regard.

That means that your web server must have PHP installed and configured.
 

Users who are viewing this thread

Back
Top Bottom