RE: [PHP] how i assign a js variable to a php variable
| From: | HallMarc Websites | Date: | Thu, 17 Sep 2009 19:33:06 +0000 |
| Subject: | RE: [PHP] how i assign a js variable to a php variable | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298127@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk]
> Sent: Thursday, September 17, 2009 3:19 PM
> To: saeed ahmed
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] how i assign a js variable to a php variable
>
> On Fri, 2009-09-18 at 02:16 +0700, saeed ahmed wrote:
> > hello guys,
> >
> > i'm new here in this list. guys i need a help. i can't assign a js
> variable
> > value to a php variable. how can i do this?
> >
> >
> > --
> > Regards,
> > Saeed Ahmed
> > Rajshahi, Bangladesh
> > Blog: http://saeed05.wordpress.com
> > --
> > Follow Me Linkedin
> >
> > <http://www.linkedin.com/in/sas05>Twitter<http://twitter.com/saeed05>
>
> You can't. Javascript is executed in the browser, PHP is executed on
> the
> server.
>
> What are you trying to achieve, as maybe there is a better way to do
> it.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
I have to disagree Ash, you can pass js variable values to PHP but only
through a page load. Then you could use $_REQUEST, $_POST, $_GET to retrieve
it. I have done this before.
[HallMarc Websites]
__________ Information from ESET Smart Security, version of virus signature
database 4434 (20090917) __________
The message was checked by ESET Smart Security.
http://www.eset.com