Hi kingcong,
Can you please provide what sort of language you're using to create the cgi script? Could also share what sort of errors you are receiving?
To be honest, I'm not at all familiar with Dreamweaver; although, I could probably provide some help with some more information.
Kind Regards,
GCS584