prelim PHP script with basic validation (WIP)