Re: javascript / php4

From: Date: Thu, 15 Jun 2000 19:18:23 +0000
Subject: Re: javascript / php4
Groups: php.general 
Request: Send a blank email to php-general+get-1991@lists.php.net to get a copy of this message
You can do this: onclick="location.href='thispage.php?test=hello';" This will reload the page, and the variable $test would equal hello. Depending on how you have PHP configured, you can either access the variable like this: echo $test; or echo $HTTP_GET_VARS["test"] This is really the only way to update a PHP variable without using a form. And it will reload the page. -- Matthew Leverton - matthew@aeroinc.net - http://www.allegro.cc -----Original Message----- From: Ben-Nes Michael <miki@canaan.co.il> To: Christian Goetze <cg@digisle.net>; PHP-General <php-general@lists.php.net> Date: Thursday, June 15, 2000 1:17 PM Subject: Re: [PHP-GENERAL] javascript / php4 >Yes I use this method widely but im looking for a way to pass the variable without >using form. >In the site that im currently building i need to pass variable from a page that >contain already a form and I can put for in a form so I left only with passing the >variable through a href tag. > >Its looks to me very logic that there is a way to tell the netscape through java >script that when onclick is called upon image it will send the variable as a for >would do. > >Am I right, is there a way ? > >Christian Goetze wrote: > >> Nope. The usual way to get data from the client to the server is via a >> posted form. Often, people put forms with hidden fields in a hidden frame >> aand populate and submit if via javascript. >> -- >> cg >> >> On Thu, 15 Jun 2000, Ben-Nes Michael wrote: >> >> > Yes, but can I force refresh and tell the browser to send the variable back to >> > the server ? >> > >> > David Newcomb wrote: >> > >> > > I would not have thought so, as the javascript is run at the front end and >> > > not the server end. >> > > >> > > ----- Original Message ----- >> > > From: Ben-Nes Michael <miki@canaan.co.il> >> > > To: PHP-General <php-general@lists.php.net> >> > > Sent: Thursday, June 15, 2000 1:08 PM >> > > Subject: [PHP-GENERAL] javascript / php4 >> > > >> > > > Hi >> > > > Can i pass variable to proccess by php using javascript with >> > > > onclick="$name='hello'" ? >> > > >> > > -- >> > > 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 >> > >> > -- >> > -------------------------- >> > Canaan Surfing Ltd. >> > Internet Service Providers >> > Ben-Nes Michael - Manager >> > Tel: 972-6-6925757 >> > Fax: 972-6-6925858 >> > http://www.canaan.co.il >> > -------------------------- >> > >> > >> > >> > -- >> > 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 >> > >> >> -- >> 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 > >-- >-------------------------- >Canaan Surfing Ltd. >Internet Service Providers >Ben-Nes Michael - Manager >Tel: 972-6-6925757 >Fax: 972-6-6925858 >http://www.canaan.co.il >-------------------------- > > > >-- >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 (#1991) next »