Question : cgi procress page

This is like going back in time for me.  I haven't done any CGI coding in ages.  What i want is a form that has the following fields Name, email, Comments

These fields will get processed and get sent in a html email using CGI I need a example on how to do this. I have looked at many sites but they get complicated.

Answer : cgi procress page

With arbitrary formatting and assuming no IDs for JavaScript manipulation, or CSS stylings, the basics are:

<html>
<body>
<form action="http://host.com/cgi-bin/scriptname" method="POST">
<p><b>Name:</b> <input type="text" name="name" size="40" maxlength="80" value=""></p>
<p><b>Email:</b> <input type="text" name="email" size="40" maxlength="255" value=""></p>
<p><b>Comments:</b><br><textarea name="comments" rows="4" cols="80"></textarea></p>
<p><input type="submit" name="submit" value="Submit!"></p>
</form>
</body>
</html>

I'd probably also tack on enctype="multipart/form-data" in the <form> tag, as that encoding is a bit more reliable and will allow you to do things like add file uploads if necessary at some point in the future.
Random Solutions  
 
programming4us programming4us