Re: Passing variables from javascript to php

From: Date: Thu, 14 Dec 2000 15:23:47 +0000
Subject: Re: Passing variables from javascript to php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30298@lists.php.net to get a copy of this message
you should be aware the javascript is client side and PHP is server side... you need to assign the javascript variable to a form element and then submit the form to allow php to see it regards Jon Farmer www.workcam.co.uk +44 (0)7968 524175 ----- Original Message ----- From: "Police Trainee" <policetrainee@yahoo.com> To: "PHP" <php-general@lists.php.net> Sent: Thursday, December 14, 2000 3:20 PM Subject: [PHP] Passing variables from javascript to php > I decided to try and learn some javascript. > Being the pure simpleton that I am, I tested the > oh-so-simple: > > <script language="JavaScript"> > <!-- > abc=window.prompt("Please enter a word."); > // --> > </script> > > I know it stores the variable because > document.write(abc) prints it > > but the variable apparently doesn't pass to php... > > <? echo("$abc");?> file://placed after the </script> tag > > > soooooo, what should I be aware of in order to make it > work? > > thank you > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Shopping - Thousands of Stores. Millions of Products. > http://shopping.yahoo.com/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#30298) next »