Jump to content


This topic is now archived and is closed to further replies.


On Submit

Recommended Posts

Im a newbie in all this and i want to ask somethnig..
I make one progran for one garage to store the customers and their car..
All the data are being store in one database..
When the owner of the program want to update the data for one customer i want to do 2 different thinks on submit..
First i want to be sure that the programmer filed the fileds that MUST be completed to continue and after i want to check my database if the customer exist in the database..If not to show a message that the customer does not exist..
I know how to make the first step to check if the fields are completed but i dont know how to solve the second step.
Also im not sure if i can do this two thinks together by click the submit button

Can somebody help me pls?

Thnx in advance

Share this post

Link to post
Share on other sites

for the second step, you're only really gonna know your answer after you've compared what the person types to the database, in which case you're gonna need to let the submit go through and do your checks in php itself.
all you need really is to make each field that requires an entry take on a default value, so that when the page reloads after submit, the user won't have to retype in all the fields again. then just set an error message in php if already exists, and when you draw your form, display the error message.
validation is one of those things that i hate to use javascript for, just incase the user has it turned off - so as youre submitting the form, you'd be good to do another check (using php) to make sure the fields have been entered correctly.


Share this post

Link to post
Share on other sites
Dear Mark first of all thnx for the reply..
The programmer must to give the name the surname and the plates of the customer to continue...
By giving these i want to connect to my database to chack if the name , surname and plates give exist in the database...
If does not exist show one msg writing the customer does not exist..

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.