main(_) :- get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), output_html([ cgi_reply, start, title('Simple CLIP telephone database'), center( [ image('http://localhost/images/clip.gif'), heading(2,'Simple CLIP telephone database'), --, Response, start_form, 'Click here, enter name of clip member, and press Return:', \\, input(text,[name=person_name,size=20]), --, end_form, image('http://localhost/images/pillow_d.gif') ]), end ]). response(Name, []) :- form_empty_value(Name), !. response(Name, ['Phone number for ', bf(Name), ' is ', Info, --]) :- phone(Name,Info), !. response(Name, ['No phone number available for ', bf(Name), '.', --]). %% Database phone('CLIP', '336-7448'). phone('Paco', '554-5225'). phone('Daniel', '460-0569').