Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 30th, 2005, 10:14 PM
Registered User
 
Join Date: Nov 2005
Location: Phoenix, AZ, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old December 1st, 2005, 08:29 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

Reply With Quote
  #3 (permalink)  
Old December 2nd, 2005, 08:18 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

(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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & JavaScript variables? mlewitz PHP Databases 2 November 30th, 2005 10:16 PM
Passing PHP variables to javascript wfrisch Pro PHP 10 April 5th, 2005 05:13 AM
Javascript & PHP rajuru Beginning PHP 6 February 22nd, 2005 06:15 AM
passin javascript variables to another page in php ismnanie Javascript 0 January 26th, 2005 01:24 AM
Q. How do I pass PHP variables to JavaScript? Snib PHP FAQs 0 April 8th, 2004 11:34 AM



All times are GMT -4. The time now is 07:35 PM.


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