Regarding your first question, you can create an array of valid content template values:
$templates = array("page1", "page2", "page3"....);
Then use a conditional statement to load the default if the passed content value isb't valid:
if (!in_array($content,$templates))
include("default.php");
else
include($content.".php");
Regarding your second question, a simple loop should do it:
<?php
$headers = "From: you@yourdomain.com\nReply-To: you@yourdomain.com";
$body = "This is a test email";
$subject = "This is a test email";
$conn = @mysql_connect("host", "user", "pass");
@mysql_select_db("db_name", $conn);
$rs = mysql_query("SELECT email FROM user_table", $conn);
while ($row = @mysql_fetch_array($rs, MYSQL_ASSOC)) {
if (eregi("[a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)$",$row["email"]))
@mail($row["email"], $subject, $body, $headers);
}
@mysql_close($conn);
?>
This should get you started, HTH.
-geoff