Well, for some nice CGI tutorials and documentation you could go to the CGI Resource Index .

Have you thought about using php ? IMO it's easyer to learn and use.