Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:25:04+00:00 2026-06-16T04:25:04+00:00

I have very simple web site (which is actually single page), there is one

  • 0

I have very simple web site (which is actually single page), there is one input field and a button.
I need to store data submitted by users somewhere on server side. Perfect way could be simple text file and new lines appended to it after each button click. Log file will be also ok.
As I understand it is not possible with JavaScript itself. I’m looking for easiest solution, preferably with no server-side programming (but if it is required, it should be as easy as possible and work out-of-box). I can use some side service if it could be helpful.
Please help.
Thanks in advance.

UPD. Just want to rephrase the main question. I do not really need to store something on server side. I need to collect some input from users. Is it possible? It would also be ok if it for example will be just sent to my e-mail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:25:05+00:00Added an answer on June 16, 2026 at 4:25 am

    For a very simple form-to-server-log script:

    Your form:

    <form action="save-to-log.php" method="POST">
      <fieldset>
        <legend>Add to log</legend>
        <p>
          Message:
          <textarea name="message"></textarea>
        </p>
        <p>
          <input type="submit" value="SAVE" />
        </p>
      </fieldset>
    </form>
    

    Then save-to-log.php

    <?php
      $log_file_name = 'mylog.log'; // Change to the log file name
      $message = $_POST['message']; // incoming message
      file_put_contents($log_file_name, $message, FILE_APPEND);
      header('Location: /'); // redirect back to the main site
    

    if it’s a unix host you’ll need to add 755 permissions to the directory of the log so PHP has access to write to it. Other than that, you’ll have a form that keeps appending information to mylog.log.

    Follow-Up

    If you don’t necessarily need it store on the server (you mentioned email) you can use the following instead as the PHP script:

    <?php
      $to_email = 'kardanov@domain.com';
      $subject = 'User feedback from site';
      $message = $_POST['message'];
    
      // this may need configuring depending on your host. If you find the email isn't
      // being sent, look up the error you're receiving or post another question here on
      // SO.
      mail($to_email, $subject, $message);
    
      header('Location: /');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

very simple question: I have admin site in my web project. So, how can
I have a web site which uses one SQL database but the hosting company
I have a very simple WCF4 Restful web service which uses WcfRestContrib to allow
Okay this question is very simple: I have a facebook page, and a website.
I have a very simple web service that returns a string (hardcoded at that).
We have a very simple ASP.NET web application comprising mostly static content and a
What I have created a very simple asp.net web service using .NET framework 3.5,
I have a very simple Mac Cocoa app that just has a Web View
Hope you are fine. I have to make a Web Project (very simple) I
I have very simple piece of code. The goal is when i input four-digit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.