HTML has a form facility with quite a few neato features. There is a Common Gateway Interface (CGI) defined between these forms and other code. Perl is a common language for interfacing with forms; C is sometimes used also. Here is some code which interfaces NU-Prolog with HTML forms. I should add the disclaimer that I don't know much about HTML or CGI. I'm probably doing some things the "wrong" way, but nevertheless, it works!
How is the connection specified? The form specifies that the ACTION is "http://www.cs.mu.oz.au/us/cgi-bin/nptest". This is the file produced by compiling the program above using the NU-Prolog compiler nc. The compiler output must be very slightly modified for the interface to work properly - see the comment in the file.
Manuel Hermenegildo has also done some related work with Sicstus Prolog and developed the PiLLoW library. Actually, lots of people have now done this kind of thing - there have been ICLP conference workshops on WWW and I'm sure they will continue.