Im stuck... Need help FAST

Discussion in 'HTML & Website Design' started by Dawran1, Dec 8, 2008.

  1. #1
    OK. I am making a website and i have a problem which i cannot seem to find the solution to.

    I have menus on both sides of my website and content in the middle. I have two boxes on either side of my website for advertisement. The problem is the advertisements need to be the same on all of my pages... which will probably more than 10,000 pages... i doubt i will be able to change every single page when i get a new advert on my site so is there a quicker way? lol

    How can i change text on every single page at the same time without using frames or iframes?

    Thanks
     
    Dawran1, Dec 8, 2008 IP
  2. luckybee

    luckybee Peon

    Messages:
    151
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is where it would be useful to a server-side programming language like PHP. You can take a look at this tutorial if your host supports PHP. What you need to do is very difficult without server-side scripting. If you can't use a server-side include, some programs like Dreamweaver has the ability to find-and-replace code on all pages of a website.
     
    luckybee, Dec 8, 2008 IP
  3. collegekid

    collegekid Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <?include "ad.txt"?>

    where ad.txt contains your ad script :)

    if u need to change ad, change ad.txt, and every page will automatically be updated
     
    collegekid, Dec 8, 2008 IP
  4. Dawran1

    Dawran1 Guest

    Messages:
    214
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I tried the <?include "ad.txt"?> code and it didnt work at all? does it have to be an .txt file? the page which containts the code dows it have to be saved as an PHP page or just html?
     
    Dawran1, Dec 8, 2008 IP
  5. collegekid

    collegekid Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    your page needs to be .php and not .html
    the ad.txt can be ad.txt or ad.html or ad.anything

    Make sure your webhost supports php.
     
    collegekid, Dec 8, 2008 IP
  6. Dawran1

    Dawran1 Guest

    Messages:
    214
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I havent uploaded my website yet, im just building it on dreamweaver now. I did everything u guys told me to and i still dont see anything...?
     
    Dawran1, Dec 8, 2008 IP
  7. mcsoftware

    mcsoftware Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hey Dawran1,
    Even in Dreamweaver you might not see it, while you are making your pages.
    but if the code is there and it is correct. It just might have to be on the sever for the php to work with it. Unless you have your computer set up with a database and all the kinds of stuff. Dreamweaver has a preview and most of the time it will show it how you want it to look. There are the rare occassion that it wont because it is a php code. if nothing else you can get a findandsearch pro where you put a word where you want the ad and then use the find and search program to find the word and replace it with the ads code you want to display.
     
    mcsoftware, Dec 8, 2008 IP
  8. collegekid

    collegekid Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I think I c ur problem. You have to uploaded and test it out online. Just by opening files on your PC won't do any good because your PC doesn't understand php.

    Maybe someone can recommend a software that allows u to test php scripts on your PC.
     
    collegekid, Dec 8, 2008 IP
  9. dejangex

    dejangex Peon

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If you want to do php on win you can get XAMPP. Your best bet would be to make a html template with the ads and text, and utilize php to use it on every page of your site. This is not very hard to accomplish if you know php, and if you are making a 10.000 page website - well... you should know php.
     
    dejangex, Dec 8, 2008 IP
  10. Dawran1

    Dawran1 Guest

    Messages:
    214
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hmm... I did everything correctly but then when i saved it to preview it i got this error:

    [​IMG]

    Anyone help please?
     
    Dawran1, Dec 13, 2008 IP