Jump to content

Recommended Posts

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 button

Can somebody help me pls?

Thnx in advance
Link to comment
https://forums.phpfreaks.com/topic/3870-on-submit/
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.

Cheers
Mark
Link to comment
https://forums.phpfreaks.com/topic/3870-on-submit/#findComment-13530
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..
Link to comment
https://forums.phpfreaks.com/topic/3870-on-submit/#findComment-13544
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.