antreas Posted March 1, 2006 Share Posted March 1, 2006 Hello,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 buttonCan somebody help me pls?Thnx in advance Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted March 2, 2006 Share Posted March 2, 2006 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.CheersMark Quote Link to comment Share on other sites More sharing options...
antreas Posted March 2, 2006 Author Share Posted March 2, 2006 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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.