NYCPHP Meetup

NYPHP.org

[nycphp-talk] JavaScript -> PHP

Daniel Krook krook at us.ibm.com
Thu Dec 15 00:08:02 EST 2005


> Folks:
> I apologize if this has been covered before, but this is a
> difficult thing to Google.  I'd like my PHP script to use 
> values that come from a JavaScript script.  I'm thinking 
> that I could probably have the .js set a cookie to be read
> by the .php, but I'm wondering if anyone has come across a
> more elegant solution than this.
> 
> Also, I'm putting together an Amazon wish list; are there 
> any JavaScript books that anyone would consider essential reading?
> 
> Thanks.
> -c


Chris,

Here's a snippet I've used to have PHP and JavaScript communicate via 
cookies.  View it with Firefox so the HTML doesn't get parsed:
http://krook.org/etc/js-cookie-php.txt

As for books, these have served me well and are highly rated at Amazon as 
well.  All are O'Reilly books:
JavaScript: The Definitive Guide (the Rhino)
JavaScript & DHTML Cookbook
Dynamic HTML: The Definitive Reference 

HTH,
-Dan



Daniel Krook, Content Tools Developer
Global Production Services - Tools, ibm.com

http://bluepages.redirect.webahead.ibm.com/
http://blogpages.redirect.webahead.ibm.com/
http://bookmarks.redirect.webahead.ibm.com/





More information about the talk mailing list