NYCPHP Meetup

[nycphp-talk] Passing JAVASCRIPT variables to PHP

Susan Shemin susan_shemin at yahoo.com
Mon Mar 31 18:51:26 EDT 2008


I'm watching this discussion with interest since I asked a similar question last month (about sending PHP stats from a JS onclick event).  The answer that came up was to put a redirect to the link page, run the PHP script on a redirect.php page and then send it on to the destination.

I've set it up this way and it's working fantastically, but I have tons of links and I'm beginning to feel hesitant about sending users to a redirect when there's so many harmful redirects out there.  (Of course, not mine...)

Just as this question came up here, I was again researching it on the internet, and very clearly saw that the crux of the problem is that Javascript is client side and PHP server side, meaning the 2 don't mix unless in Ajax.

So I'm off to brush up on my Ajax and get it working, because except for the redirect, I can only see that Ajax will work.

Susan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080331/c32e4b1d/attachment.html>


More information about the talk mailing list