Re: Any ideas on what my PHP file should look like...
Posted: Thu Jul 11, 2013 10:26 pm
but have also tried this:
on sendMail
if the hilite of button "IAgree" then
put empty into myFormData
put libUrlMultipartFormData(myFormData, \
"rcpnt" & ("~@~.com"), \
"subj","LoanApp", \
"cu",(the selectedText of button "CUlist"), \
"mn",(field "MembNmbr"), \
"ff",(field "FirstField"), \
"lf",(field "LastField"), \
"tf",(field "teleField"), \
"af",(field "AltField"), \
"ef",(field "EmailField"), \
"if",(field "IncomeField")) \
into myError
if myError is empty then
set the httpHeaders to line 1 of myFormData
post line 2 to -1 of theFormData to URL "~://~.~/downloads/App/App.php"
put the result into rslt
if rslt is empty then
beep
answer information "Submitted successfully"
else
beep
answer rslt
end if
else
beep
answer error "Can't submit data because of error:" && myError
end if
end if
end sendMail
<?php
$rcpnt="rachel@oaktreebiz.com";
$subj=$_POST["subj"];
$cu=$_POST["cu"];
$mn=$_POST["mn"];
$ff=$_POST["ff"];
$lf=$_POST["lf"];
$tf=$_POST["tf"];
$af=$_POST["af"];
$ef=$_POST["ef"];
$if=$_POST["if"];
$s=" "; //space
$msg=$cu.$s.$mn.$s.$ff.$s.$lf.$s.$tf.$s.$af.$s.$ef.$s.$if;
$header = "MIME-Version: 1.0\r\n" .
"Content-type: text/plain; charset=latin-1\r\n" .
"\r\n";
$rslt = mail($rcpnt,$subj,$msg,$header);
if (!$rslt)
echo 'An error occurred';
else echo 'Mail sent';
?>
on sendMail
if the hilite of button "IAgree" then
put empty into myFormData
put libUrlMultipartFormData(myFormData, \
"rcpnt" & ("~@~.com"), \
"subj","LoanApp", \
"cu",(the selectedText of button "CUlist"), \
"mn",(field "MembNmbr"), \
"ff",(field "FirstField"), \
"lf",(field "LastField"), \
"tf",(field "teleField"), \
"af",(field "AltField"), \
"ef",(field "EmailField"), \
"if",(field "IncomeField")) \
into myError
if myError is empty then
set the httpHeaders to line 1 of myFormData
post line 2 to -1 of theFormData to URL "~://~.~/downloads/App/App.php"
put the result into rslt
if rslt is empty then
beep
answer information "Submitted successfully"
else
beep
answer rslt
end if
else
beep
answer error "Can't submit data because of error:" && myError
end if
end if
end sendMail
<?php
$rcpnt="rachel@oaktreebiz.com";
$subj=$_POST["subj"];
$cu=$_POST["cu"];
$mn=$_POST["mn"];
$ff=$_POST["ff"];
$lf=$_POST["lf"];
$tf=$_POST["tf"];
$af=$_POST["af"];
$ef=$_POST["ef"];
$if=$_POST["if"];
$s=" "; //space
$msg=$cu.$s.$mn.$s.$ff.$s.$lf.$s.$tf.$s.$af.$s.$ef.$s.$if;
$header = "MIME-Version: 1.0\r\n" .
"Content-type: text/plain; charset=latin-1\r\n" .
"\r\n";
$rslt = mail($rcpnt,$subj,$msg,$header);
if (!$rslt)
echo 'An error occurred';
else echo 'Mail sent';
?>