Check database with Javascript

Status
Not open for further replies.

Mike

New member
Jun 27, 2006
6,777
116
0
51
On the firing line
Let's say I wanted to make sure that someone had completed a specific task before allowing them to continue, how would I do that?

More specifically...

People need to complete an offer that is iframed, and when they do, I get the postback from the cpa company. Once the postback comes through, the database is updated to show they completed the offer. Now, they are given a "Continue" button on my page (not in the iframe) and when they click it, I need to check the database to see if the offer has been completed first.

How can this be done with Javascript? If they have completed it, they'll get to go on to the next page. If they haven't they'll get an error message saying that they must complete the offer first.

Make sense? :D
 


Look at ajax.

Bascially, what you do is trigger a PHP script by Javascript.

::emp::
 
I have been using YUI a lot. It's pretty easy to make an ajax call to a php script and return the results.
 
Status
Not open for further replies.