Find the answer to your Linux question:
Results 1 to 3 of 3
How can I complete a standard html form and send the data from it to a plain.txt file on my machine under Fedora. I tried with PHP code, perl, Javascript, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie user-f11's Avatar
    Join Date
    Feb 2011
    Location
    Sofia, BG
    Posts
    185

    Writing data of html form to USB file in Fedora


    How can I complete a standard html form and send the data from it to a plain.txt file on my machine under Fedora.
    I tried with PHP code, perl, Javascript, I put an USB stick, made 'an artificial file', changed the file mode in any way ... with poor results.
    The browser opens the .html, .php, .pl, .js, .asp files from the disk without any problems, but doesn't want to write anything ... even on the USB.
    If you have any fresh ideas.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    It sounds like you are asking for help writing CGI script hosted on a local website to write a text file a locally mounted USB disk, yes? Can you show examples of what you've tried? My first thought would be that the user running the webserver (apache, nobody, etc.) does not have permissions to write wherever you are trying to write the file. You might want to have a sudo entry for a custom script you write that can be called by your CGI script to:

    a) get user input in the form,
    b) mount the USB disk,
    c) write the data to the file on the USB disk,
    d) sync the filesystem on the USB disk,
    e) unmount and eject the USB disk

    If you are experiencing errors with your form, be sure to check the appropriate logs for errors (e.g., the default Apache log locatiom is /var/log/httpd/error_log). Also check the system log for errors (/var/log/messages).

  3. #3
    Linux Newbie user-f11's Avatar
    Join Date
    Feb 2011
    Location
    Sofia, BG
    Posts
    185

    RE: What am I trying to do?

    I wanted to make a user friendly interface for completing a large database by using the browser offline, but I solved the problem in another way.
    I made a template in Word that saves the data directly in machine form (.csv file), so for now I 'ended up my career as offline web designer'.
    Thank you for the response.

  4. $spacer_open
    $spacer_close

Posting Permissions

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