When a category is selected in a dropdown menu, the validation needs to change, if there is a price then display "this category costs", if upload='1', display upload section.
MySQL Database (category table):
- catid, parentid, name, description, cost, tel, email, web, upload, enabled
Example category: Has price of [url removed, login to view] and all other columns are enabled except email: '', '', 'test', 'description', '[url removed, login to view]', '1', '0', '1', '1', '1'.
After submit check if the selected category does not allow either an email address, website, and/or contact number. If it does not allow it, check if it exists in description field.
If exists load the same page with all the info that was submitted, and display a message "Our system has detected .... We do not allow this for security reasons. Put in square brackets [ ... ]".
If it does exists, but has square brackets around it, then allow it.
It needs to check any possibilities. EG: 'contact number' will look for any 8+ digits close together like: 01234567890, 0 1 2 3 4 5 6 7 8 9 0.
I'd guess how it will work is to find a number in the description field, then if there are any spaces after, remove it, then check what the next character is. If it is a number, keep looping until you get 8+ numbers, and if so do not allow the information to be added to the database and display a message.
DESIGN HAS BEEN DONE.
I was told to use 'preg_match'. I dont know if this is the correct way of doing it, but if so this might help: [url removed, login to view]
IF INTERESTED IN THIS PROJECT, JUST POST A MESSAGE AND I WILL SHOW YOU WHAT HAS BEEN DONE ALREADY (so you know how it should work).