php includes

zonogon

Solid State Member
Messages
20
I'm new to php and I dont know how to link using php. I have links as image hotspots on a template and have a space for the body area. I've herd that you can link using php includes or something and it can change the page like an iframe with out actually using an iframe. How would I code something like this?
 
Don't post random links to your own websites, especially when they make little to no sense to the questions being asked.
 
do you now that I could have swore that I'd answered this question, but i must have closed the rowser before actually submitting what I wrote!!

Anyway...
I think this is what you are asking for...


there are two ways to include information from other files, either use include, or require

eg,
Code:
<?php

print "<head><title>test</title></head>
<body>";
include ('menu.html');
print "page content
</body>";
?>

That code will work and draw a page, that has both the content of that page (page content) and the contents of a menu page (manu.html0 displayed in the browser...

if the server can't find the menu page then it will just ignore it an carry on processing the page.

Code:
[code]
<?php

print "<head><title>test</title></head>
<body>";
require ('menu.html');
print "page content
</body>";
?>
Same thing with relation to drawing the page, with the exception that if t can't find the document (menu.html). it will error and not continue with the page.


did that answer your question?
 
what exactly do you mean make a form in PHP, do you mean a form like a regular HTML form?
 
Back
Top Bottom