Another option would be to break your one form into two separate forms where
the first form asks for this number, checks the database, then transfers to
user to the next logical page (rest of form or re-enter data) based on the
results of that query to the db.

I'm not saying it's anywhere near the BEST solution especially of traffic
will be heavy, but it's an option. I've seen it used elsewhere
(, for example) with varying degrees of success. Basically, if
you only do it to your user once, maybe twice, you can get away with it. Any
more and you stand the chance of losing your user - especially if the
connection speed is slow (56k or slower).

Your basic challenge here is that you need to communicate with the db to do
the checking you want and that takes a round trip from the browser to the
server and back. Basic web-based hurdle, but you have to design to your

Then again, maybe somebody else out there HAS already solved this...?

Good luck.
-----Original Message-----
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 8:58 AM
To: Rodrigo; PHP
Subject: RE: [PHP-DB] Form question.......

That's a toughie.  I've done it once where I used a small popup window
(opening it with JavaScript) to go to the server, perform the query to
retrieve the information, stuff it into a JavaScript array and then return
the array to the calling page and close the window.

It works but the user will see a small window pop-up.

Other than that, it is possible to use a Java Applet to do it as well.


* Cal Evans
* The Virtual CIO

-----Original Message-----
From: Rodrigo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 7:30 PM
Subject: [PHP-DB] Form question.......

Hi, i have a question, it may be dumb, but im very new with php and mysql,
i need help.

 how can i check a form when i change from one field to another???? I want
make a condition.....if the number i typed is allready in the database, not
just when i finish filling out the hole form...clickin in submit and then
make the !!!! heheheh

         Rodrigo Corra

      Obs: Sorry about the english, im from my english isnt

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to