Confused about how to trigger a script- solved

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
CyborgPrime
Forum Newbie
Posts: 3
Joined: Wed Nov 12, 2008 2:31 am

Confused about how to trigger a script- solved

Post by CyborgPrime »

Hello-

I have a database that uses an online form to gather info from the user.

The form is rather long - its for a scholarship applcation and there are a lot of fields.

I want to automatically update the database every time the user moves from field to field.

How can I call PHP subroutines from javascript?
Last edited by CyborgPrime on Mon Apr 19, 2010 5:49 pm, edited 1 time in total.
User avatar
novice4eva
Forum Contributor
Posts: 327
Joined: Thu Mar 29, 2007 3:48 am
Location: Nepal

Re: Confused about how to trigger a script

Post by novice4eva »

you could use AJAX, but it all sounds like a bad idea!! But maybe not :mrgreen:
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Confused about how to trigger a script

Post by VladSun »

CyborgPrime wrote:I want to automatically update the database every time the user moves from field to field.
Why? It seems to be a bad idea to me too.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Confused about how to trigger a script

Post by aceconcepts »

Like the others have said "This seems like a bad idea".

However, an alternative may be to split the fields up into stages so that you can gather data per stage.
CyborgPrime
Forum Newbie
Posts: 3
Joined: Wed Nov 12, 2008 2:31 am

Re: Confused about how to trigger a script

Post by CyborgPrime »

Oh - because the users could never remember to hit the save button or because they had a spotty internet connection- and they were complaining that they lost all this work.

I fixed this by using AJAX and it works perfectly.
Post Reply