<TITLE>Add</TITLE>

<!
includeFile("../../text&html/add-form.html");


if ($name=="" || $email=="" || $country=="" || $comment=="") {
   echo("<CENTER><BLINK>You must enter data in all fields.</BLINK>\n");

   echo("<FORM ACTION=\"add.msql\">\n");
   echo("<CENTER>\n<TABLE>\n");
   echo("<TR><TD>Name:</TD><TD><INPUT name=\"name\" VALUE=\"$name\" SIZE=40></TD></TR>\n");
   echo("<TR><TD>Country:</TD><TD><INPUT name=\"country\" VALUE=\"$country\"SIZE=20></TD></TR>");
   echo("<TR><TD>E-mail:</TD><TD><INPUT name=\"email\" VALUE=\"$email\" SIZE=40></TD></TR>");
   echo("<TR><TD COLSPAN=2><TEXTAREA NAME=\"comment\" VALUE=\"$comment\" ROWS=6 COLS=45></TEXTAREA></TD></TR>");
   echo("<TR><TD COLSPAN=2><INPUT TYPE=\"reset\" VALUE=\"Clear fileds\">\n");
   echo("<INPUT TYPE=\"submit\" VALUE=\"Submit data\"></TD></TR>\n");
   echo("</TABLE>\n</FORM>\n");

   exit(0);
   }

echo("<PRE>\nFollowing data was received:\n");
echo("$name\n");
echo("$email\n");
echo("$country\n");
echo("$comment\n");



$outfile=open("/tmp/testfile", ">");
if ($outfile<0) {
   fatal("OPEN: $ERRMSG\n");
   }

fprintf($outfile, "               -----------------------------------------\n");
fprintf($outfile, "               Greetings from Leptospira Internet Server\n");
fprintf($outfile, "               -----------------------------------------\n\n");

fprintf($outfile, "As being a member of our editorial board, please send comment about this\nquestion to ILS secretary.\n");
fprintf($outfile, "%s (%s) has mailed follwing question.\n", $name, $country);
fprintf($outfile, "His E-mail address is %s\n", $email);

fprintf($outfile, "\nQuestion:\n");
fprintf($outfile, "%s\n", $comment);

close($outfile);

system("mail interview@mala.vet.bg.ac.yu < /tmp/testfile");

>
