WA Server Validation Problem
Hi:
I have used WA Server Validations before with very good results, but not this time.
I’m trying to double check whether two data entered in an insert page already exist in a particular table in the db. The first is the month in a date field and the second is the username.
The month I get using a SELECT MID(Date(Now()),6,2) AS month1 and the second is stored in $_SESSION[‘MM_Username’]
Then I have a recordset “parsedMonth2 with these parameters:
SELECT pslip.date, pslip.username
FROM pslip
WHERE pslip.username = akauser AND MID(pslip.date,6,2) = colname
Akauser uses $_SESSION[MM_Username’] as Runtime Value and colname uses $_POST[‘month1’] as Runtime Value.
The WA Server Validation uses Validation Trigger = Current page submit; validation type = Number; and Server variable = $totalRows_parsedMonth2; Format = English (1,000.00); Minimum = -1; Maximum = 0; and Allow decimals = All.
What am I not doing right here?
The Validation should allow users to enter their data when the conditions username AND MID(date,6,2) are not given together. As it is, however, the Validation never allows for entering the data, even when the table is empty. It always sends users to the error-message page.
Attached please also find a copy of the Insert page that contains the validation.
Any suggestions?
Thank you for your attention