Jump to content


On Submit

  • Please log in to reply
2 replies to this topic

#1 antreas

  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationNicosia,Cyprus

Posted 01 March 2006 - 11:00 PM

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

#2 redbullmarky

  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 02 March 2006 - 01:27 PM

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.

"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#3 antreas

  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationNicosia,Cyprus

Posted 02 March 2006 - 02:23 PM

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..

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users