i need some help

nickdudego3

New Member
okay i have this website and it has multiple user pages and they all have the same marquee and im wondering if anybody can help me find a script that links the marquee to an external file that i edit to update the marquee so i don't have to keep going one page at a time plz help!!!


thx
 
Last edited:

joe

New Member
What you could do is store the marquee in a text file and use php's to read the file and display on the web page. Here's some code you can use:
Code:
$myFile = "[COLOR="Red"]testFile.txt[/COLOR]";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
 
Last edited:

nickdudego3

New Member
okay

okay well i don't know too much about php im more with html and that but i can learn but thats beside the point can you show what i would edit by putting it in red and can i save the page i input the code into as .html or do i have to save it as .php or do you think you could help me find another way to be honest i never actually understood php or javascript i know basic javascript like how to make a popup window and a password popup menu
 
Last edited:

joe

New Member
I edited the code to show you what you would need to change. you'll need to make a php page.
 

nickdudego3

New Member
okay so i would really like to know if i can do this in javascript i managed to learn how to make it in javascript but there's a problem one i can't use links oh and by the way i used document.write to do it and two when i put too much or something i have been using process of elimination to figure out exactly what the problem is it shows up blank so is there another javascript syntax i could use that is better or that can support more than 20 words i attached the two files that im using to test the syntax if you if you need to use php just do what ever you need to do to those files and attach them plz

i'll use them for further reference

thx
 

Attachments

  • test files.zip
    393 bytes · Views: 6
Last edited:

joe

New Member
Here.....this works. just change what you want in testfile.txt
 

Attachments

  • test.zip
    386 bytes · Views: 8

4folds

New Member
If it's always going to be the same size you could use an IFrame. Do a search for Iframe code and you'll get some. It's really simple.

Another option would be to do a server side include. A little harder, but also very effective.
 

emopoops

Banned
use the include thing
place the include where u want it to go on the pages
<?php include()?> something like that works awesomely
 

Unknown98

New Member
That is off-topic...

Put the marquee in an HTML file. Then on all your other pages, replace the marquee with something like this:

<div id="marquee">
<? include("path to marquee file"); ?>
</div>

Then in the future all you have to do is update marquee.html and every page will be updated.

What this does, is include that marquee file in every single page.

You will need to rename all the pages that you put the above PHP code in as .php files.

Unk
 
Top