Call a PHP script from a livecode server script
Posted: Sun Aug 03, 2014 3:08 am
I am having what seems to be a simple problem to solve, but I can't.
How do I post data to an existing php script? I receive it fine with this
<?lc
put $_POST["FName"] into firstname
put "FName=" & firstname into PostToPHPScript
post PostToPHPScript to URL("http://domain.com/receivepost.php")
?>
My php script reads:
<?php
$fname=($_POST["FName"]);
echo $fname;
?>
and the page errors with:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@johnkane.on-rev.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
Obviously, I am using on-rev.com as my host.
The php script works fine when called as the form action. And the LiveCode script does as well. It is only when I do a livecode server html post to a php script that it fails.
Any help would be appreciated.
Thanks,
John
How do I post data to an existing php script? I receive it fine with this
<?lc
put $_POST["FName"] into firstname
put "FName=" & firstname into PostToPHPScript
post PostToPHPScript to URL("http://domain.com/receivepost.php")
?>
My php script reads:
<?php
$fname=($_POST["FName"]);
echo $fname;
?>
and the page errors with:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@johnkane.on-rev.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
Obviously, I am using on-rev.com as my host.
The php script works fine when called as the form action. And the LiveCode script does as well. It is only when I do a livecode server html post to a php script that it fails.
Any help would be appreciated.
Thanks,
John