Uploading Files using CGI

Uploading files is a useful thing to know about especially if you want to go about making some kind of admin function for your Web site. There is a very useful form element which is: <input type="file" name="file_data">. This element displays a textbox and a "Browse" button in the browsers which support it: When you click on the "Browse" button you will get a file dialog where you can cho...

Posted in CGI at 2005-11-17T00:13:08Z.

Emails in CGI

Note: these examples are all in Perl. Emails in UNIX The simplest way to send emails on a UNIX system is to use the sendmail utility: open(MAIL, '| /usr/lib/sendmail user@there.com') or "die"; print MAIL &lt;&lt;EOF; To: user@there.com From: user@here.com Hello, World! EOF This uses an external program to send emails. This is fine on UNIX systems which have this utility, but on anoth...

Posted in CGI at 2006-05-19T14:45:04Z.