Custom PHP / Data Capture in User Profile

We have user specific data which I need to capture probably POST registration as do not want to make the registration process too cumbersome.

The data is unique to the user and is around measurements. I have already created a pure HTML/Javascript/CSS version of the form for 'standalone' use on Android tablets which serves as a guide to our travelling agents in the field.

What I want to achieve is to integrate a similar feature into CS-Cart. Having said that, it doesn't necessarily have to be a total integration. I am happy to develop this as an external php script to process the form and save the data to a separate table in the database.

What I must be able to do though is pass the user 'logged-in' status to the script from CS-Cart as only want this available to logged-in registered users - so I need to capture current user logged in state and ID and pass to PHP as variable

I welcome any feedback from users who have achieved this functionality…