CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   MySQL (http://www.codingforums.com/forumdisplay.php?f=7)
-   -   Saved text box system (http://www.codingforums.com/showthread.php?t=284295)

spudmonkee 12-17-2012 07:41 PM

Saved text box system
 
Hey guys,

I'm trying to make a form with around forty-five separate text fields (quick draft below) and I need some help in regards to saving the entries.

Basically I need it to record text entered and display it as the value of the text area. E.G. I type "example" into a box, hit save, refresh the page and see "example" in the text box it was previously entered in.

http://mineimg.com/images/2012/12/17/EGWy.png

Any help would be much appreciated, thanks :).

Old Pedant 12-17-2012 07:53 PM

And what if somebody types something into three different boxes and then clicks SAVE on only one of them?

Do you expect all 3 to be saved? Or only the one clicked on?

Have you considered doing this via AJAX, so that the user does not *HAVE* to refresh the page? That way only the one(s) clicked on are saved but other changes are not (yet) lost.

spudmonkee 12-17-2012 07:56 PM

Quote:

Originally Posted by Old Pedant (Post 1300597)
And what if somebody types something into three different boxes and then clicks SAVE on only one of them?

Do you expect all 3 to be saved? Or only the one clicked on?

It would only save that particular entry which corresponds with the button.

Quote:

Originally Posted by Old Pedant (Post 1300597)
Have you considered doing this via AJAX, so that the user does not *HAVE* to refresh the page? That way only the one(s) clicked on are saved but other changes are not (yet) lost.

I'll look it up, thanks :).

Old Pedant 12-17-2012 08:32 PM

I really think AJAX may be your best answer.

You could perhaps change the background color of an answer once it is saved (and change it back if the player changes it again, until it is saved again).

This would not be hard to implement. Each button would simply send the corresponding answer to the server and change the background to indicate it had been sent.

Question: Is this on a per-person basis? That is, does each person have his/her own set of 45 answers?


All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.