Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2004, 10:21 AM
Authorized User
 
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can session variables be used inside Java?

Hello all.

This might be a simple yes/no answer but:
Is it possible to use session variables from php code (code like $_SESSION['whatever']) inside javascript?. I am developing code to not only validate a form (the javascript part), but also set values into a session variable for use on another page (the php part).

Is this possible, and if so, does anyone have an example / link to it? If not, is there an alternate solution?

I don't have the code set up yet but I'm hoping it's going to validate something like the following:

- 4 radio buttons each with its own value, 1-4
- javascript is used to check which button is pressed
- depending on the button, the session variable is set to the radio button's value
- the session variable is then used on another page ...
 
Old October 14th, 2004, 02:26 PM
Authorized User
 
Join Date: Aug 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay ...

I've solved it.
I can just use the java to check if the button is pressed and on the "db saving" page, use the $_posts and $_gets to retrieve the buttons value instead of using the session variables.

(no doubt this was the wrong forum location to post my original message as there was no replies at all, lots of ppl read though, lol) ...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variables in C# shikha09 C# 1 November 28th, 2006 10:38 AM
Pass variables from array inside a loop dustygn PHP How-To 2 May 3rd, 2006 05:35 PM
Session Variables testsubject Visual Studio 2005 8 March 8th, 2006 04:26 PM
Is it possible for me using session variables into see07 ASP.NET 1.x and 2.0 Application Design 4 March 9th, 2005 07:46 PM
Session Variables flesh_god Dreamweaver (all versions) 7 November 11th, 2003 05:52 PM





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