From: Leif W <war...@us...> - 2003-07-02 18:51:32
|
I think single quotes ('$name') disables the variable referencing... try to concatenate: $query = "SELECT * FROM users WHERE name='" . $name . "'"; Leif ----- Original Message ----- From: "Daniel Tiru" <de...@ti...> To: <an...@co...>; "dynapi help" <dyn...@li...> Sent: Wednesday, July 02, 2003 2:54 PM Subject: Re: [Dynapi-Help] listen for remote events?? > Well... hmm how do you write out stuff in php? Cause i am not familiar with the language... You should probably ask again to the dynapi-help group. > > Sorry that i cant help you :/ > > Regards > Daniel > > > SIGH :((( > > nothing to do! > > It seemed that could work at the begining but ... > > happens something strange in my php script: > > > > <? > > ... > > $name = "<script>document.write(name)</script>"; > > $query = "SELECT * FROM users WHERE name='$name'"; > > // $query = "SELECT * FROM users WHERE name='test'"; > > ... > > ?> > > > > first of all: making a stamp of the php var $name gets the right result, it writes on the document 'test' > > BUT: if I put '$name' in my query the record found is null, while if I put manually the static string 'test' it works!!! > > > > how is it possible? It write the value of the var $name but this var cannot be used for an operation server-side as the execution of a query? > > > > maybe I need to shutdown my linux > > and go out for a beer ... ;) > > > > antonio > > > > > > Il Wed, 02 Jul 2003 16:06:00 +0200 > > Daniel Tiru <de...@ti...> ha scritto: > > > > > Hi! > > > > > > I'm not a expert :) But... hmm well, you need to write out js code in the myfunction.php > > > > > > You have some examples in the example directory... but start with just write out a <script language="javascript">alert('hello');</script> > > > > > > thats how i figured out :) > > > > > > /Daniel > > > > > > > Hi Daniel, > > > > now that I have a bit of time I'm testing the ioelement ... > > > > I have a question for you: how do you get the var to use in your dynamic script (php or asp etc...)? > > > > i.e. I have to build a query in the remote file > > > > in local file > > > > ... > > > > var data = { > > > > name : 'test' > > > > } > > > > ioelement.get("myfunction.php",data,fn); > > > > ... > > > > > > > > in remote file > > > > <? > > > > $query = "SELECT * FROM user WHERE name='(heren the var I need)'"; > > > > // and execute the query etc ... > > > > ?> > > > > > > > > I've tried using the eval function but nothing :( > > > > > > > > any tips? > > > > > > > > thanks > > > > antonio > > > > > > > > Il Wed, 02 Jul 2003 13:37:00 +0200 > > > > Daniel Tiru <de...@ti...> ha scritto: > > > > > > > > > Great! :) > > > > > > > > > > Tell me how its going :) > > > > > > > > > > Good luck > > > > > Daniel > > > > > > ehehe ok Daniel > > > > > > now I understand ... I have to use a dynapi timer! Right! > > > > > > I haven't no idea on how to implement this code but I'll try ;) > > > > > > > > > > > > thanks a lot > > > > > > > > > > > > Il Wed, 02 Jul 2003 12:46:17 +0200 > > > > > > Daniel Tiru <de...@ti...> ha scritto: > > > > > > > > > > > > > Hi! > > > > > > > > > > > > > > No! :) > > > > > > > What you do is make a html page... with dynapi functions and a ioelement and some kind of timer (havent used the dynapi timer yet but..) and then you set the timer to execute the ioelement every 5 seconds or something... you will never notice a page refresh, cause the ioelement isnt visible for the eyeif you get what i mean... > > > > > > > > > > > > > > When the ioelement then get the page, you will in php write out what to do, nothing or maybee write some new layers or something... thats up to you :) > > > > > > > > > > > > > > hope you getmy point :) > > > > > > > > > > > > > > Regards > > > > > > > Daniel > > > > > > > > > > > > > > > thanks Daniel :) > > > > > > > > so I have to refresh every tot seconds the page that should receive the remote event ... mmm ok I've understand > > > > > > > > > > > > > > > > > > > > > > > > Il Wed, 02 Jul 2003 12:20:16 +0200 > > > > > > > > Daniel Tiru <de...@ti...> ha scritto: > > > > > > > > > > > > > > > > > Hi Antonio! > > > > > > > > > > > > > > > > > > What you could do with the ioelement is if you "schedule" it from yor webpage to run every 10 seconds or something and alert you if something happends(ie: if some conditions meet in your php file, you write out alert('happening'); etc etc...). > > > > > > > > > > > > > > > > > > I have tried it with ASP so it would be no problem to get it to work with php. > > > > > > > > > > > > > > > > > > Regards > > > > > > > > > Daniel Tiru > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > hi all, > > > > > > > > > > I'm new to Dynapi and however to DHTML (I'm a php programmer). > > > > > > > > > > I have a question for you: is it possible to have an element in my web page that listen for an event (i.e. a changement in a file or database) that happens on another page? > > > > > > > > > > I have seen the ioelement from Dynapi ... can it be useful for my purpose? > > > > > > > > > > > > > > > > > > > > really thanks in advance > > > > > > > > > > antonio > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > > > > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > > > > > > > > > Data Reports, E-commerce, Portals, and Forums are available now. > > > > > > > > > > Download today and enter to win an XBOX or Visual Studio .NET. > > > > > > > > > > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > > > > > > > > > > _______________________________________________ > > > > > > > > > > Dynapi-Help mailing list > > > > > > > > > > Dyn...@li... > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |