Doctype Form in custom Portal page

Hi there,

How can I submit data from a custom form in www folder, the same way as a normal doctype would be submitted?

Thanks