View Full Version : Here's the problem...


Buffy
06-24-2003, 05:06 PM
Hello!
I wrote about this problem before, but I can't find my old post sorry and I'm still having problems... plus now there's a forum for it! Whoo!

I've created a site using tables, which firstly I'm not used to but it works best for the type of site I'm creating. The best example of a site that has a similar layout is celebrity-exchange.com (http://www.celebrity-exchange.com)

If you look on her site, there are content links under 'navigate'. When you click on those the content appars in the centre cell. This is pretty much how might site woks and I can do all that fine.

Now the problem is: If you look on her site again down the right hand side she has 'new media added', similar to that I'm having a cell where I will put news updates, and I plan to update them frequently. However to do that at the moment I would have to update it in the cell on every single page of content I have.

Now I know there's a way of doing it so I wouldn't have to put the news updates in everywhere. But only once on the main [index] page. I know this involes Perl or PHP or something. But I've never used them.

If this all makes sense I'd be very greatful to know how to use something so I can update the new only once and it appears on every page when I click on a content link.

Thank you xx

kittycat
06-24-2003, 05:56 PM
This could be what you're looking for...

<?
include ("updates.php");
?>

You'd put that in all the files where you want to include the updates, and save each as a .php file. Then in the updates.php you'd just put your updates. The updates can be any sort of file, txt, html...

zangerbanger
06-24-2003, 07:25 PM
SSI would also work for this kind of thing :) .

http://www.lissaexplains.com/html6.shtml

Buffy
06-24-2003, 08:34 PM
Originally posted by kittycat
This could be what you're looking for...

<?
include ("updates.php");
?>

You'd put that in all the files where you want to include the updates, and save each as a .php file. Then in the updates.php you'd just put your updates. The updates can be any sort of file, txt, html...

That's sounds good! I'll give it try! Thanks!

Buffy
06-25-2003, 07:45 PM
Okay the PHP made it come out at the top left corner for some reason! So I tried the SSI and this has been the closest I've got to getting it right! Yay! However instead of my news update appearing it says...

[an error occurred while processing this directive]

Buffy
06-25-2003, 07:52 PM
Also, sorry for double, actually triple posting but my index page is straight into the site and actually includes one of the SSI news update code things, this means that I have to give the url out as www.mysite.co.uk/nameofthissite/index.shtml because it is hosted of my main site. Does the php version allow it to just be www.mysite.co.uk/nameofthissite?

If you can help me with what might have gone wrong with both anyway that would be great. Thanks.

Dude128
06-26-2003, 03:03 AM
I'm not really sure what you're asking, but using SSI or PHP, you should be able to use just the folder (as in,www.[domain].com/foldername), as long as the default page's name is in the format index.[ext]

also, the PHP include function should just place whatever is in the included file wherever you put the PHP code. so if you want something inserted in the middle of your file, put the PHP code there. were you putting it at the beginning of the file? that would insert it at the top left corner.

Buffy
06-26-2003, 10:12 PM
I did, I put it in the cell of my table I wanted it to appear in, but it didn't it appeared in the top left.

Buffy
06-26-2003, 10:34 PM
Okay I'm trying the PHP version again! Would it just be easier if someone read my source, see where I'm going wrong?

The index page is here (http://www.chaosdream.co.uk/rip/)

In the cell, top right is where the updates should be added. The updates page can be found here (http://www.chaosdream.co.uk/rip/updates.php) .

Thanks!

bellportal
06-28-2003, 03:42 PM
Try:

http://www.dynamicdrive.com

There is a script which allows you to insert pages like SSI, but doesn't use SSI. However, your users will need to support DHTML.

HTH,