another PHP-Revlet question
Pierre Sahores
psahores at free.fr
Sat Aug 29 14:15:31 EDT 2009
Hi Yves,
Should this help as a starter point (javascript support needed) ?
form2.irev :
<html>
<head><title>iphplib</title>
</head>
<body>
<form action="httpr2.php" method="post">
<p>Type in this field<br>
<input type="text" name="textfield">
<p><input type="submit" value="Check">
</form>
</body>
</html>
httpr2.php :
<html><body>
Please, wait...
<?php
$exAE = "";
while (list($header, $value) = each($_POST)) $exAE .= "$header=
$value&";
echo '<form name="toirev" action="httpl2.irev" method="post"
id="toirev_id"><input type="hidden" name="contents"
value=&'.urlencode($exAE).'></form>';
?>
<script language="JavaScript">
document.forms['toirev'].submit();
</script>
</body></html>
httpl2.irev :
<html>
<head>
<title>iPHPLib</title>
</head>
<body>
<?rev
repeat for each key k in $_POST
put k & "=" & urldecode($_POST[k]) & "&" after aaa
end repeat
if aaa is not ""
then put "<fieldset class=contact><table><tr><td>" & aaa & "</td></
tr></table></fieldset>"
else put "<fieldset class=contact><table><tr><td>" & "souci..." & "</
td></tr></table></fieldset>"
?>
</body>
</html>
Let me know. If not, there is a second way to go (without js support
need) in using curl
Best Regards,
Pierre
> Hi list
>
> I have a PHP function which needs an argument and this PHP function
> returns an answer
>
> How can I post an argument to a PHP function and recover the return
> value of the PHP function ?
> The classic post command doesn't give the answer in a rev variable
>
> Thanks.
>
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
Pierre Sahores
mobile : (33) 6 03 95 77 70
www.woooooooords.com
www.sahores-conseil.com
More information about the use-livecode
mailing list