&lt;?
set errlist {}
if { [var exists title] } {
    set title [var get title]
} else {
    set errlist "You need to enter a title"
}

if { [var exists salary] } {
    set salary [var get salary]
    if { ! [string is digit $salary] } {
	lappend errlist "Salary must be a number"
    }
} else {
    lappend errlist "You need to enter a salary"
}

if { [var exists boss] } {
    set boss [var get boss]
} else {
    set boss "Mr. Burns"
}

if { [var exists skills] } {
    set skills [var list skills]
} else {
    lappend errlist "You need to enter some skills"
}

if { [llength $errlist] != 0 } {
    foreach err $errlist {
	puts "&lt;b&gt; $err &lt;/b&gt;"
    }
} else {
    puts "Thanks for the information!"
    ?&gt;
    &lt;table&gt;
      &lt;tbody&gt;
	&lt;tr&gt;
	  &lt;td&gt;&lt;b&gt;Title:&lt;/b&gt;&lt;/td&gt;
	  &lt;td&gt;&lt;? puts $title ?&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
	  &lt;td&gt;&lt;b&gt;Boss:&lt;/b&gt;&lt;/td&gt;
	  &lt;td&gt;&lt;? puts $boss ?&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
	  &lt;td&gt;&lt;b&gt;Salary:&lt;/b&gt;&lt;/td&gt;
	  &lt;td&gt;&lt;? puts $salary ?&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
	  &lt;td&gt;&lt;b&gt;Skills:&lt;/b&gt;&lt;/td&gt;
	  &lt;td&gt;&lt;? puts $skills ?&gt;&lt;/td&gt;
	&lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
    &lt;?
}
?&gt;
