Looks like you've started off fine.

The bit between <<HTML and HTML is just one big long string ('HTML' is 
the terminator), so the conditional bit has to be outside it(*)

puts <<HTML
  .. page header and other stuff
HTML
if first == "" || last == ""
  puts "<p>Please re-enter</p>"
else
  puts "<p>Welcome etc...</p>"
end
puts <<HTML
  .. page footer
HTML

When you've realised this is an ugly way to write even small web apps, 
google for "ruby sinatra" for a better way.

Regards,

Brian.

(*) Actually I lied - you can embed expressions inside #{...}. It's not 
a good idea to do it here though.

-- 
Posted via http://www.ruby-forum.com/.