test button to lookup mysql info and validate

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I know how to use php/mysql, but the html aspect of
what Im trying to do (if its even possible this way) is what Im unsure

I want to have a button that a user can hit to valid mysql info before
submitting the full page of info.  I know this doesnt work, but
something like the following:

<form method=POST action="http://mysite.com/send.php ">
<input type=text name=user>
             .... do mysql lookup here and let user know 'user' is
.... many more input types here ...
<input type=submit name="Submit">

Im unsure if A) it will work this way and B) how do even do this?

Will it work this way?  If so what do I fill in in the button area?
Ive wondered if I need/should use javascript, but in looking around
the web it seemed that wouldnt work easily, or would it?
I know that the 'user' information is posted in the FORM, so Im unsure
how to get it into the php section anyhow.

Thanks for any help

Re: test button to lookup mysql info and validate

Bob wrote:
Quoted text here. Click to load it

As this is an HTML question, not a PHP one, might I suggest a more
appropriate newsgroup - such as alt.html?

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: test button to lookup mysql info and validate

Quoted text here. Click to load it

I suspect you're a bit confused about the relationship between what
happens serverside and what happens client side:

The server geenrates a page of HTML, then the client displays it.

There are ways to make things happen serverside without refreshing the
page - using Ajax or hidden iframes or tying code execution into other
operations triggered by javascript such as reloading an image.

I assume that you are presenting a form for the user to fill in, then
submitting it for some sort of validation prior to submitting it to be

While it is possible to do this (and its possible to code a static
javascript function which will work regardless of the specifics of the
form) a better solution would be just to use two submissions.

The key to working out the best method depends on knowing whether the
user will always be able to write the data in the final step.


Site Timeline