$tem->show('opt_db_5');
}
if($GLOBALS['opt_email'] == 'Yes') {
+ $this_domain = $_SERVER['HTTP_HOST'];
+ if(substr($this_domain, -2) == '.l') {
+ $this_domain = substr($this_domain, 0, -1) . 'com';
+ }
+ $tem->set('this_domain', $this_domain);
$tem->show('opt_email_1');
$tem->show('opt_email_2');
}
# SETUP
<!--~opt_email_1 {~-->
# To send results by e-mail, all you have to do is set your e-mail address here:
-$GLOBALS['~file_name~_form_recipient'] = "fixme@example.com";
+$GLOBALS['~file_name~_form_recipient'] = 'fixme@example.com';
<!--~}~--><!--~opt_db_1 {~-->
# To save results to a database, you'll need to create the ~table_name~ table
# (the file ~file_name~.sql should help with this), and create the file
db_insert('~table_name~', ~file_name upper~_DB_FIELDS, ~php_fields~);
message('~singular cap~ saved.');
}<!--~}~--><!--~opt_email_2 {~-->
- if($GLOBALS['~file_name~_form_recipient'] != "fixme@example.com") {
+ if($GLOBALS['~file_name~_form_recipient'] != 'fixme@example.com') {
$to = $GLOBALS['~file_name~_form_recipient'];
- $from = $to;
- $reply_to = '';
+ $from = 'noreply@~this_domain~';
+ $reply_to = $to;
if(isset($_REQUEST['email']) and valid_email($_REQUEST['email'])) {
$reply_to = $_REQUEST['email'];
if($_REQUEST['name'] and ereg('^[a-zA-Z0-9_\' -]*$', $_REQUEST['name']) !== false) {