this is my script
#!/usr/bin/env ruby
require 'sqlite3'
print "Content-type: text/html\r\n\r\n"
print "<html><body>Hello Stack Overflow<p></body></html>\r\n"
database = SQLite3::Database.new( "new.database" )
database.execute( "create table new_table (id INTEGER PRIMARY KEY, content TEXT);" )
database.execute( "insert into new_table (content) values ('this is a stack')")
database.execute( "insert into new_table (content) values ('this is overflow')")
rows = database.execute( "select * from new_table" )
p rows
This works but prints the rows in one line. I want to add a line break but I don´t know how.
html tag
doesn´t work, \n neither.
Can you help?
<br>will do the work, since you are printing HTML.