Personally i dont use *nix for its functionallity, more for its secure way of whatever... if i wanted some code to be able to execute and or add whatever on my system i would of continue being friends with 'B Gates'
This can only be done if the user that is running Apache or whatever web server you use has access to the adduser command. I would suggest setting sudo so that Apache's user (be it nobody or apache or http) can make use of adduser. This would probably be the safest way, but even then, very insecure!