p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   PHP & JavaScript variables? (http://p2p.wrox.com/showthread.php?t=35655)

mlewitz November 30th, 2005 10:14 PM

PHP & JavaScript variables?
 
Can PHP and JavaScript write to variables that each can share?

For example, if I define a variable with a JavaScript, can I use that variable with a PHP script? ...and vice-versa?

Thanks!

Mike L

jmaronilla December 1st, 2005 08:29 PM

Mike,
I use to do this when validating form from HTML.
It can be done, but the problem you need be an expert in
scripting JavaScript & PHP. I recommend you to use
JavaScript on the client side and PHP in the server side.
Use both is very complicated.
John


anshul December 2nd, 2005 08:18 AM

(Interactive) JavaScript validation is done to prevent delay, discomfort for the user, while submitting a form.

Server-side validation is essential to prevent scraps loading your database.

Note that, communication b/w PHP & JavaScript is not an issue; people rarely do it.

`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Students' finances


All times are GMT -4. The time now is 01:06 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.