Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embed PHP within a site

Status
Not open for further replies.

Bravogolf

Programmer
Joined
Nov 29, 2002
Messages
204
Location
GB
Hi everybody!
I have a guestbook and want to embed it as part of my page, is this hard to do?

Currently the guestbook has to be loaded in a seperate window :(

It would be nice if I could keep it all in the one site!
 
it's not hard at all to imbed php pages as a part of another page.

so let's say you have a page called guestbook.html right now. that is where you want to have the little box to have visitors fill in the guestbook. but currently your guestbook is on myguestbook.php.

save guestbook.html as guestbook.php.

then wherever you want to insert the myguestbook.php page ..
Code:
<?php include('myguestbook.php'); ?>

from now on use guestbook.php as your page (it replaces guestbook.html - the php extension just lets you add php to your html code) ... lemme know if you need anything else :)
cheerio

If programming were as fun as cycling, then we'd need more bike mechanics.
 
You might want to put in a table cell or maybee an iframe as well
 
honestly i wouldn't put it in an iframe just for the reason that a large percentage of web browsers cannot display them .. i run osx and website that have i-frames aren't cool because i can't see what is supposed to be displayed in there..

definitely though put it in a table cell! nice suggestion ingresman

If programming were as fun as cycling, then we'd need more bike mechanics.
 
is it just this little bit that you want to embed into the page? Tell us a little bit more about the page and how you load it currently? It could be easier to just build the code directly into the page your loading. 1 file instead of two.

___________________________________
[morse]--... ...--[/morse], Eric.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top