SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    How to dynamically write to page?

    How to let a website visitor dynamically write some text to the page?

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    My first impulse is to say JavaScript, but we really need more details on what you're trying to accomplish.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Force Flow View Post
    My first impulse is to say JavaScript, but we really need more details on what you're trying to accomplish.
    Has to be php so it's indexable. Or if that can be done with js cool. I want a visitor to be able to write text and push submit and it goes on the webpage. Exactly like a comment engine would.

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Do you have any experience with (MySQL) databases? It's rather trivial, you need to submit form to the PHP page that will save posted content to the database (or file if you want) and when (your original) page is loaded just read and display the data.

    The point is you need to save the content on your server. It depends on your needs (and knowledge) whether you'll use file(s) or database to store the data.

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Avram View Post
    Do you have any experience with (MySQL) databases? It's rather trivial, you need to submit form to the PHP page that will save posted content to the database (or file if you want) and when (your original) page is loaded just read and display the data.

    The point is you need to save the content on your server. It depends on your needs (and knowledge) whether you'll use file(s) or database to store the data.
    No I don't. But I know it's easy right. I could just store them in a flat file too right?

  6. #6
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you don't need to do advanced selection of data but just read the data as it was written, then yes. You can use file_get_contents and file_put_contents. Just make sure that user which executes PHP binary has correct permissions to write to your data file(s). Note that these functions are just wrappers to standard fopen, fwrite/fread and fclose functions.

  7. #7
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I just need a guestbooks script actually. It just needs to be flat file and have a captcha.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,803
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by EricWatson View Post
    I just need a guestbooks script actually. It just needs to be flat file and have a captcha.
    First result from a search of Google gives http://www.phpjunkyard.com/php-guestbook-script.php which uses a flat file, has a captcha and is free.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    First result from a search of Google gives http://www.phpjunkyard.com/php-guestbook-script.php which uses a flat file, has a captcha and is free.
    I need a website entry field too. Preferable links the name. I tested many without a website field. I can't seem to find a way to make the link a hyperlink. Bbc code nor html works in them.

  10. #10
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you can use MySQL database you can check the comment script script I've made. It has website field and supports simple HTML. It integrates into your custom php files.

  11. #11
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    are you trying to do this ?
    inline page update?
    http://www.labs.mimmin.com/inlineedit/#demo
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  12. #12
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I used gbook guestbook script to do it. http://www.websitecodetutorials.com/...inks/gbook.php

  13. #13
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    A simple commenting engine solution would be disqus. No programming really required with a service like that.
    The only code I hate more than my own is everyone else's.

  14. #14
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    A simple commenting engine solution would be disqus. No programming really required with a service like that.
    Disqus is nofollow. Needed to be dofollow


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
  •