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';
?>
Any ideas on what my PHP file should look like...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Any ideas on what my PHP file should look like...
Hi Rae,
I have made a few small corrections to my original script. This is the new LiveCode script:
This is the PHP script:
and this is the script without From header:
All tested and approved 
Kind regards,
Mark
I have made a few small corrections to my original script. This is the new LiveCode script:
Code: Select all
on sendMail
if the hilite of button "IAgree" then
put empty into myFormData
put libUrlMultipartFormData(myFormData, \
"rcpnt", ("recipient@economy-x-talk.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 myFormData to URL "http://economy-x-talk.com/rae/rae.php"
put the result into rslt
put the urlResponse
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
Code: Select all
<?php
$rcpnt = $_POST['rcpnt'];
$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 = "From: Your Name <mail@economy-x-talk.com>\r\n" . "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 in: $msg\r\n$rcpnt\r\n$subj";
else
echo 'Mail sent';
?>
Code: Select all
<?php
$rcpnt = $_POST['rcpnt'];
$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 in: $msg\r\n$rcpnt\r\n$subj";
else
echo 'Mail sent';
?>

Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Any ideas on what my PHP file should look like...
Awesome! Works perfectly. Thank you so Much Mark. All this you did on a Saturday and everything. I am so thankful. I bet this will come in handy for many users.
Sincerely,
Rae
Sincerely,
Rae
Re: Any ideas on what my PHP file should look like...
Is there a way I can give you any "kudos" Mark? You have made made my week.
Re: Any ideas on what my PHP file should look like...
Hi Rae,
I'm happy to help, it wasn't that difficult actually. Just... if you like my explanations, perhaps you'd like my book as well
Kind regards,
Mark
I'm happy to help, it wasn't that difficult actually. Just... if you like my explanations, perhaps you'd like my book as well

Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode