If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2013
    Member #
    I'm doing a Humane Society website, and I want to show a counter of animals adopted this year that can be updated by the director of the shelter. I need to make it as simple as possible for her (and for me--just learning). Is there a way to let her just upload a text file with a number or three (total, cats, dogs) that I can fetch into an HTML page? Do I need something more sophisticated, like JS or PHP?



  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Montreal, Canada
    Member #
    878 times
    I'd use PHP includes for that kind of thing.

    MAke a file template for the director, something like this:
    <div id="count"
    <p class="dogs"> XX Dogs Adopted</p>
    <p class="cats"> XX Cats Adopted</p>
    <p class="total"> XX Total Animals Adopted</p>

    That's ALL you put in that file, and call it "counter.php".

    Then rename your html file from whetever.html to whatever.php.
    Make sure both files are uploaded to the same folder.

    Now wherever you want to have that <div id="count"> show up, you put this:
    <?php include("counter.php"); ?>

    You can use the id and the classes in your CSS to style the output.

    When the director wants to change a number, she can just edit the XX part of the counter.php file, inserting the updated number there, and then upload the file.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib ~ my current site . . ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 04:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: