|
|
|
lingo to php with browser on stage
Added on 9/18/2003
|
PHP is in fact very simple. Control your website and PHP with lingo. The PHP script is commented.
Using the activeX for browser control is also explaned.
//
// $newName=urldecode($name);
// $newScore=urldecode($score);
//
// $tTekst = " Gefeliciteerd, $newName met je $newScore punten ";
//
// echo $tTekst;
// ?>
--simple behavior by wouter van der lucht
--w.vdlucht@chello.nl
--communication from lingo to php
--You need a server with PHP working on it (normally called apache)
--I used Personal webserver phptriadsetup2-11.exe. Easy install, already configured
--Comes with apache, php, mysql and more
on mouseUp me
tName="wouter"
tScore="203456"
--localhost is under apache normally folder "C:apachehtdocs"
--put there your .php
tUrl="localhostLingourldecode2.php"
sendVarsToPHP(tName,tScore,tUrl)
end
on sendVarsToPHP tName,tScore, tUrl
tUrlEncode1=URLEncode(tName)
tUrlEncode2=URLEncode(tScore)
tVar1="name="
tVar2="&score="
tUrl=tUrl
tTekst=tUrl&"?"&tVar1&tUrlEncode1&tVar2&tUrlEncode2--
--I did put the IE browser on stage with insert/control/activeX/Microsoft webbrowser
--it comes in the cast then you put it on stage.(sprite(1))
sprite(1).navigate(tTekst)
end
--the php: paste it without comments in a text editor(notepad or something)
--make sure the the extension is really .php
--*************************************************
--
--
--
-- lingo to php
--
--
--
-- $newName=urldecode($name);
-- $newScore=urldecode($score);
--
-- $tTekst = "Gefeliciteerd, $newName met je $newScore punten ";
--
-- echo $tTekst;
--?>
--
--
--
--
--
--***********************************************
|
|