another PHP-Revlet question
Christian Langers
christian.langers at education.lu
Sat Aug 29 17:20:41 EDT 2009
Hi Yves,
may it be :
put "http://www.mondomaine.com/myfunctionfile.php?var="&urlencode(tVar)
into tURL
put URL("File:"&tURL) into myNewVar
using $_GET["var"] in PHP and echo the result ?
Greets,
Christian
On 29/08/09 20:55, Yves COPPE wrote:
>
> Le 29-août-09 à 20:15, Pierre Sahores a écrit :
>
>> 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
>
>
> Re Pierre,
>
> my goal is not to use a js code
>
> Just a script in a revlet handler
>
> for example
>
> for a php command, I use
>
> put "myVar=" & urlEncode(fld "myFld") &"&adresse=" &
> urlEncode(tadresse) into myString
> post myString to URL "http://www.mondomaine.com/codefile.php"
>
> for a function I write
>
> put "http://www.mondomaine.com/myfunctionfile.php" into tURL
> put URL("File:"&tURL) into myNewVar
>
>
> but
>
> now I have to post a var to a function and recover the result of the
> PHP function !
>
> so I have to mix something between a post or a put
>
>
> 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
>
More information about the use-livecode
mailing list