Solved.
Had to include wp-load.php.
OK, thought I’d just encompass it all into mlist.php.
mlist.php:
<?php
get_header();
// Email validation
// and database queries
// go here,
// along with conditional output
get_sidebar ();
get_footer ();
Now since I’m calling the get_*() functions, I’ll need to move mlist.php into the theme folder, yes? Well that’s what I did.
Then I opened up sidebar.php and changed my form to <form action=”mlist.php” method=”post”> since mlist.php and sidebar.php reside in the same directory.
This gave me an error when I submitted the form on my front page. So I changed it to action=”full/path/to/mlist.php”. Now I get an error “Call to undefined function get_header()”. How do I get this to work?