zeroge
01-04-2010, 02:42 PM
Hi. ... First, my apology - I'm not a PHP guru. :o
I have worked out a simple form page that contains about 16 text input fields which, upon giving the insert button a punch, will insert all data straight into my DB. you can view the page (http://www.chinabiz21.com/downloads/dataentry_test.php) here.
Now, everything works just like a beauty but I can't figure out the code I'd need that would ...
A - tell me that this record already exists in the database (checking a view fields like, email, mobile, company name for an existing entry) OR
B - tells me the data can't be submitted, because some wrong input was supplied and hence I should check those data before try to submit again.
(I have my DB set up with foreign key constraints like; e.g. the very last field "Client" allows only for entries such as y, n, r, and d - I have the same for other field such as Country, Visa)
Now that's just breaking my old head ... Could somebody help me out, P L E A S E ?
Thank you very much
I have worked out a simple form page that contains about 16 text input fields which, upon giving the insert button a punch, will insert all data straight into my DB. you can view the page (http://www.chinabiz21.com/downloads/dataentry_test.php) here.
Now, everything works just like a beauty but I can't figure out the code I'd need that would ...
A - tell me that this record already exists in the database (checking a view fields like, email, mobile, company name for an existing entry) OR
B - tells me the data can't be submitted, because some wrong input was supplied and hence I should check those data before try to submit again.
(I have my DB set up with foreign key constraints like; e.g. the very last field "Client" allows only for entries such as y, n, r, and d - I have the same for other field such as Country, Visa)
Now that's just breaking my old head ... Could somebody help me out, P L E A S E ?
Thank you very much