Hi All,
Check line 3, this line is where the email address the script sends the form to is entered, but I want to be able to edit this address in an admin page.
to do this I would like this script to read the address/addresses from a text file.
When I include I get a Parse error due to the " marks, My PHP language skills are limited and I cant get past this.
There is a lot more script but when I enter an email address as the script is intended it works fine so it is only line 3 I am having trouble with
<?php
// config details
$MailToAddress = "<? include("email.txt"); ?>"; // email addresses
$email = "[email protected]";
$redirectURL = "http://mydomain.com/msg_cont.php"; // the URL of the thank you page.
$MailSubject = "[Incident Report]"; // the subject of the email
$sendHTML = true; //set to "false" to receive Plain TEXT e-mail
$serverCheck = false; // if, for some reason you can't send e-mails, set this to "false"
$counter_file = "./counter.cnt";
There is a lot more script but this is all working fine.
How do I include the email address that is stored on a separate text file?
(Please forgive any spelling errors - the Answer spell check function get confused with the above code so I decided not to use it)
Thank you Ray - I just needed a nudge in the right direction - I used the "file_get_contents();" in the end....
Thanks Again
Check line 3, this line is where the email address the script sends the form to is entered, but I want to be able to edit this address in an admin page.
to do this I would like this script to read the address/addresses from a text file.
When I include I get a Parse error due to the " marks, My PHP language skills are limited and I cant get past this.
There is a lot more script but when I enter an email address as the script is intended it works fine so it is only line 3 I am having trouble with
<?php
// config details
$MailToAddress = "<? include("email.txt"); ?>"; // email addresses
$email = "[email protected]";
$redirectURL = "http://mydomain.com/msg_cont.php"; // the URL of the thank you page.
$MailSubject = "[Incident Report]"; // the subject of the email
$sendHTML = true; //set to "false" to receive Plain TEXT e-mail
$serverCheck = false; // if, for some reason you can't send e-mails, set this to "false"
$counter_file = "./counter.cnt";
There is a lot more script but this is all working fine.
How do I include the email address that is stored on a separate text file?
(Please forgive any spelling errors - the Answer spell check function get confused with the above code so I decided not to use it)
Thank you Ray - I just needed a nudge in the right direction - I used the "file_get_contents();" in the end....
Thanks Again