Results 1 to 3 of 3

Thread: Need to create a simple 'update text on website' from a simple admin page

  1. #1
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need to create a simple 'update text on website' from a simple admin page

    Hi there,

    Have a simple html page which will display a restaurant's specials, each special consisting of an <h2> and a <p>, and they would like a very basic admin html page where they can update these specials in the list and also add or delete them. I need something really really basic, like input box, text area, click add special and it adds it - but not sure where to start, does anybody know how I could achieve this? The admin page doesn't even need to have a login - literally just ability to update specials dynamically.

    My html page currently looks like this:

    Code:
    <div class="specials">
    <ul>
    
    <li>
    <h2>20% Off all orders this Weekend</h2>
    <p>Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <br><br><br>
    <a href="tel:0317653059" class="phone">click to call</a>
    </p>
    </li>
    
    <li>
    <h2>20% Off all orders this Weekend</h2>
    <p>Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <br><br><br>
    <a href="tel:0317653059" class="phone">click to call</a>
    </p>
    </li>
    
    <li>
    <h2>20% Off all orders this Weekend</h2>
    <p>Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <br><br><br>
    <a href="tel:0317653059" class="phone">click to call</a>
    </p>
    </li>
    
    </ul>
    </div>

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,965
    Thanks
    16
    Thanked 305 Times in 304 Posts
    Blog Entries
    11

    Default

    does anybody know how I could achieve this?
    It depends on a few things - whether you know a server-side language (such as PHP), if your server is setup to run it, and if you have the time and knowledge to write a custom built script like this.

    For something simple, you probably don't need to go for a full-blown database solution. Flat files should be fine.

    If you are willing to overlook a custom build (where the end-user fills out a series of specifically labelled input fields to add an new entry, and then edits/deletes listings via a listing entry manager) you can probably get away with as pre-made script where a portion of the webpage is editable - rather like where you would edit a menu list in MS Word. Of course, this could potentially allow the end-user to completely fudge up your menu listing but that's part of the trade-off; Time, expertise and a custom-built script with very small error-margin Vs quick, ready-made, free alternative with potentially a bigger margin for error.

    If that's a trade-off you're happy with, could you work with something like this? : http://fast-edit.co.uk/demo_besm/

    Your server would need to run PHP and the page that the end-user is editing would need to be renamed with the .php extension. Another way is to use .htaccess to make the server parse HTML pages as PHP http://php.about.com/od/advancedphp/p/html_php.htm and then the page that it being edited could keep the .html extension (not ideal as it makes the server work harder, but it could be an option)
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,363
    Thanks
    31
    Thanked 140 Times in 135 Posts
    Blog Entries
    32

    Default

    You could also give them this code:
    Code:
    <head>
    <style type="text/css">
    pre{
    white-space: pre-wrap;       /* css-3 */
    white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
    white-space: pre; /* CSS2 */
    white-space: -moz-pre-wrap; /* Mozilla */
    white-space: -hp-pre-wrap; /* HP printers */
    white-space: -o-pre-wrap; /* Opera 7 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: pre-wrap; /* CSS 2.1 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
    }
    li{margin-top: 0px; margin-bottom: 0px; font-size:150%; font-weight: bold}
    div{margin-left:18px; margin-top:-20px;}
    </style>
    </head>
    
    <body>
    
    <pre style="font-family: verdana; font-size: 12px">
    
    
    <li>20% Off all orders this Weekend</li>
    <div>
    Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <!-- -->
    click to call
    </div>
    
    <li>20% Off all orders this Weekend</li>
    <div>
    Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <!-- -->
    click to call
    </div>
    
    <li>20% Off all orders this Weekend</li>
    <div>
    Lorem Ipsum ist ein einfacher Demo-Text für die Print- und Schriftindustrie. Lorem Ipsum ist in der Industrie bereits der Standard Demo-Text seit
    <!-- -->
    click to call
    </div>
    
    
    </pre>
    </body>
    and then tell them that they are only allowed to change text between the li-tags and the div-tags (and that 'they get what they see').
    So they can do it themselves.
    If their text is supposed to belong to another page containing other info and maintained by yourself, you could insert their text using an iframe.

Similar Threads

  1. Simple form to update mysql
    By lmbarns in forum PHP
    Replies: 1
    Last Post: 07-26-2012, 12:44 PM
  2. Need help with Simple sql query to update time
    By asim1 in forum MySQL and other databases
    Replies: 0
    Last Post: 11-29-2011, 12:00 PM
  3. simple xml update from php form
    By chriskq in forum PHP
    Replies: 1
    Last Post: 11-05-2008, 10:49 AM
  4. RSSDisplayBox - Simple Admin Page?
    By justcallmerich in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-26-2008, 11:37 PM
  5. Create A Simple Search Page
    By tomyknoker in forum PHP
    Replies: 9
    Last Post: 12-03-2007, 12:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •