Hope someone can help... Im no programmer and it will no doubt show in my questions...
I have an iframe with the source of:
email.php?ID=[email]
The ID is passing an email address which will be different every time, I would like to use this variable as the address to submit the form to.
The form page (for testing) is a very simple single input field and submit button using a form created with 'Simfatic Forms'
The email.php code is as follows:
<?PHP
require_once("./includes/test-lib.php");
$formmailobj = new FormMail("test");
$formmailobj->setFormPage(sfm_readfile("./templ/test_form_page.txt"));
$formmailobj->setFormID("ed3317e6-39ad-4dca-96d9-137b3f4d22f2");
$formmailobj->setFormKey("c1e8cb6f-1598-4b2f-b6af-9ea684a7fda8");
$formmailobj->setEmailFormatHTML(true);
$formmailobj->EnableLogging(false);
$formmailobj->SetDebugMode(true);
$formmailobj->SetFromAddress("sender@website.com");
$formmailobj->SetCommonDateFormat("m-d-Y");
$formmailobj->SetSingleBoxErrorDisplay(true);
$fm_installer = new FM_FormInstaller();
$formmailobj->addModule($fm_installer);
$formmailobj->setIsInstalled(true);
$formfiller = new FM_FormFillerScriptWriter();
$formmailobj->addModule($formfiller);
$formmailobj->AddElementInfo("Name","text");
$page_renderer = new FM_FormPageRenderer();
$formmailobj->addModule($page_renderer);
$validator = new FM_FormValidator();
$validator->addValidation("Name","req","Please fill in Name");
$formmailobj->addModule($validator);
$data_email_sender = new FM_FormDataSender(sfm_readfile("./templ/test_email_subj.txt"),sfm_readfile("./templ/test_email_body.txt"),"forms<forms@simfaticforms.com>");
$data_email_sender->AddToAddr("<name@website.com>");
$formmailobj->addModule($data_email_sender);
$tupage = new FM_ThankYouPage(sfm_readfile("./templ/test_thank_u.txt"));
$formmailobj->addModule($tupage);
$formmailobj->ProcessForm();
?>
I have tried to change line 29:
$data_email_sender->AddToAddr("<name@website.com>");
replacing the part <name@website.com> with the variable but no success.
I think its to do with the variable not being posted, but dont know where to start... As I say, im new to programming and this is a bit advanced for me, so be kind! :-)