fincon
asked on
Form text validation
Hi there,
Can you please help me with a php script to compare text entered into a web form to the current date? Date will only be year and month.
Any help would be greatly appreciated...
Can you please help me with a php script to compare text entered into a web form to the current date? Date will only be year and month.
Any help would be greatly appreciated...
What are the comparison requirements?
ASKER
Hi Roonan...
I need a user to enter a number like 703MSZT010853 (this is a product serial number), the first three digits is the manufacturing date (1st = year, 2nd = month) and the item has a 3 year warranty. I need to check these numbers with the current date to validate warranty on the unit and return with a message.
Thanks
I need a user to enter a number like 703MSZT010853 (this is a product serial number), the first three digits is the manufacturing date (1st = year, 2nd = month) and the item has a 3 year warranty. I need to check these numbers with the current date to validate warranty on the unit and return with a message.
Thanks
ASKER
Sorry - The 2nd AND 3rd digit is the month..
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
steelseth,
Thank you for your input, however, I get the following error:
PHP Fatal error: Call to undefined function: str_split() in C:\Domains\testcrt.co.za\w wwroot\lgs n.php on line 24
Thank you for your input, however, I get the following error:
PHP Fatal error: Call to undefined function: str_split() in C:\Domains\testcrt.co.za\w
ASKER
Is there possibly a way of checking this in normal HTML?
ASKER
Also, can it be validated in months instead of years?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you guys! As alwasy, expert advice for a beginner like me! I appreciate all your time and effort! Thanks