We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

PHP query!

Options
Hi guys

Is it possible to add a "comment" section to your website without using a database?

If so how would i go about doing this? Ive looked all over the net and cant find anything anywhere.

Cheers
I need a cig...

Comments

  • trcooke
    trcooke Posts: 309 Forumite
    Not entirely sure what you mean by a "comment" section but if it's simply recording user comments from a form and then displaying them on the web page then why don't you build yourself a basic database using files instead of a 'real' database such as MySQL.
  • mikem1986
    mikem1986 Posts: 358 Forumite
    what do you mean by a basic database usign files? I didnt get any databases with my hosting package (stupid of me i know)

    Yes i want people to be able to post a comment from a form which appears on the web page...

    thanks for help in advance
    I need a cig...
  • trcooke
    trcooke Posts: 309 Forumite
    For example: When the user submits the form with their comments on it, use some PHP code to write those comments to a file on your webserver. Then for your page that displays the comment use some more PHP to read the comments from the said file and display it on your web page.
  • mikem1986
    mikem1986 Posts: 358 Forumite
    that sounds complicated eeeek!

    im not that technical with php tbh

    all ive done with php so far is just submitting form to an email
    I need a cig...
  • trcooke
    trcooke Posts: 309 Forumite
    It's not that bad. For what you're doing there its a lot simpler than using a database. Have a look here for help on file handling with PHP: http://www.w3schools.com/php/php_file.asp.

    Some general advice though. It may be beneficial for you to stay with your current implementation of receiving your user's input via e-mail. It'll give you the opportunity of vetting the comments and making sure that you don't get any inappropriate content appearing on your website, whether it be from spam bots or from malicious people.

    If it won't be too much of a hassle for you to add the decent / clean comments you receive to your website yourself then this could be the best way to go.
  • mikem1986
    mikem1986 Posts: 358 Forumite
    i was just thinking that myself actually trcooke

    ive also raised a support issue with my hosting company asking if i can use the databases i have from my other website on the new website...

    we'll see what they say :-)

    thanks again
    I need a cig...
  • Paul_Herring
    Paul_Herring Posts: 7,482 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Photogenic
    While I hate these types of 'tutorials': http://www.youtube.com/watch?v=J7Gf8CuU4Ak

    Or maybe try http://diamond-back.com/software/guestbook/
    Conjugating the verb 'to be":
    -o I am humble -o You are attention seeking -o She is Nadine Dorries
  • samhale
    samhale Posts: 413 Forumite
    You'd have to set it not from locahost, but from somewhere else.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.9K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.9K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.2K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.