You are suffering from the split-brain syndrome of web development. PHP as you
know is a server-side while Javascript is client-side application. The left
side of the brain needs to communicate to the right side of the brain. For the
PHP to see the variables they must be posted to the server either as Form-Post
variables or hidden-form-variables. I've done this by invoking DOM to
instantiate client-side objects (hidden-form-variables) and then posted the
form via a submit (Javascript called).
If I'm off base here sorry about that but I know that I've been stung by this a
lot in my applications.
Rudy
----- Original Message -----
From: PaulCheung
To: [email protected]
Sent: Thursday, June 21, 2007 10:07 AM
Subject: [nyphp-talk] Javascript & PHP
I have put together an HTML form that uses Javascript which works well.
However when I fill it in and fire it off to my PHP script (which for the
purpose of testing simply echos what was entered in to the form) it cannot find
the entered data; But when I strip out the Javascript and the fields that uses
the javascript my PHP script happly echos back what was entered into the form.
does anubody know what I am doing wrong??
Paul
------------------------------------------------------------------------------
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php