is it possible to create a form that is functional offline?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
KG
Forum Newbie
Posts: 8
Joined: Tue Sep 26, 2006 4:11 pm
Location: Lexington, KY / Huntsville, AL

is it possible to create a form that is functional offline?

Post by KG »

I've created an online survey for my company, in which data is entered by a user and submitted to a mySQL table. I've been searching for a way to make this form available offline, but so far haven't found any help.

I wonder if there may be a way to save the data or write it to a txt file, which can then later be uploaded to the database?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Generally that's not possible on the client machine as it's a security issue to store into a file. You could possibly store it into a cookie, but you're limited in the length of the cookie and quantity of cookies you may set for the site associated.

At any rate, that doesn't involve PHP, but Javascript or some other Client Side programming environment.
User avatar
KG
Forum Newbie
Posts: 8
Joined: Tue Sep 26, 2006 4:11 pm
Location: Lexington, KY / Huntsville, AL

Post by KG »

so then it's not possible for a php program to write to a text file without being connected to the internet.. or rather it's not secure?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

KG wrote:so then it's not possible for a php program to write to a text file without being connected to the internet.. or rather it's not secure?
PHP resides on the server, without being able to access the server you won't be able to interact with PHP.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

You may wanna look at something like this - http://www.indigostar.com/microweb.htm

Works perfect for me.

Can run PHP/MYSQL sites off a CD, floppy, or whatever you want
Post Reply