php-general Digest 18 Sep 2009 08:30:35 -0000 Issue 6345

Topics (messages 298114 through 298135):

Re: ie6 "memory could not be read" help!
        298114 by: Ashley Sheridan
        298116 by: HallMarc Websites
        298117 by: Ben Dunlap
        298119 by: Ralph Deffke
        298122 by: Paul M Foster
        298123 by: Ashley Sheridan
        298124 by: Andrea Giammarchi
        298126 by: Ben Dunlap
        298128 by: Andrea Giammarchi
        298130 by: Robert Cummings
        298131 by: Andrea Giammarchi

Re: Question: Sorting through table headers?
        298115 by: Parham Doustdar

Re: APC - Upload progress problem. apc
        298118 by: Ben Dunlap
        298120 by: Andrea Giammarchi
        298134 by: Phred White

how i assign a js variable to a php variable
        298121 by: saeed ahmed
        298125 by: Ashley Sheridan
        298127 by: HallMarc Websites
        298129 by: Andrea Giammarchi
        298132 by: Phred White
        298133 by: HallMarc Websites
        298135 by: Gautam Bhatia

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Thu, 2009-09-17 at 12:56 -0500, Philip Thompson wrote:

> On Sep 17, 2009, at 4:04 AM, Ashley Sheridan wrote:
> 
> > On Thu, 2009-09-17 at 16:41 +0800, Shelley wrote:
> >> Hi all,
> >>
> >> With IE6,
> >>
> >> After the pages i developed was loaded, there seems to be no problem,
> >> but when you then click a link, refresh the page, etc. it shows  
> >> "memory
> >> could not be 'read'" error message.
> >>
> >> However, when you load other sites, google.com, for example, there  
> >> is no
> >> such problem.
> >>
> >> Anybody knows how to fix this problem?
> >>
> >> Any help is appreciated & thanks in advance.
> >>
> >
> > http://support.microsoft.com/kb/899811
> >
> > first result from a Google search
> >
> > Thanks,
> > Ash
> 
> Since this post is not PHP-related, I'll continue the trend. Are  
> people still using IE6? In sites I design, I prevent the user from  
> viewing it. If they're still on IE6, I don't want them to use my sites.
> 
> Cheers,
> ~Philip
> 


Yeah, the browser is nearly 15 years old!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Wow. IMHO that is a really bad stance to take on IE 6. Most offices still
have IE 6 for whatever reason. If you block them then you are blocking
possible clients. There is still a large percentage that still use it.


Thank you,
Marc Hall
HallMarc Websites
610.446.3346

> -----Original Message-----
> From: Philip Thompson [mailto:philthath...@gmail.com]
> Sent: Thursday, September 17, 2009 1:56 PM
> To: PHP General list
> Subject: Re: [PHP] ie6 "memory could not be read" help!
> 
> On Sep 17, 2009, at 4:04 AM, Ashley Sheridan wrote:
> 
> > On Thu, 2009-09-17 at 16:41 +0800, Shelley wrote:
> >> Hi all,
> >>
> >> With IE6,
> >>
> >> After the pages i developed was loaded, there seems to be no
> problem,
> >> but when you then click a link, refresh the page, etc. it shows
> >> "memory
> >> could not be 'read'" error message.
> >>
> >> However, when you load other sites, google.com, for example, there
> >> is no
> >> such problem.
> >>
> >> Anybody knows how to fix this problem?
> >>
> >> Any help is appreciated & thanks in advance.
> >>
> >
> > http://support.microsoft.com/kb/899811
> >
> > first result from a Google search
> >
> > Thanks,
> > Ash
> 
> Since this post is not PHP-related, I'll continue the trend. Are
> people still using IE6? In sites I design, I prevent the user from
> viewing it. If they're still on IE6, I don't want them to use my sites.
> 
> Cheers,
> ~Philip
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> __________ Information from ESET Smart Security, version of virus
> signature database 4434 (20090917) __________
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
> 

 

__________ Information from ESET Smart Security, version of virus signature
database 4434 (20090917) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


--- End Message ---
--- Begin Message ---
> have IE 6 for whatever reason. If you block them then you are blocking
> possible clients. There is still a large percentage that still use it.

I think that percentage depends on the target audience. There was a
kerfuffle several months back (maybe a year ago now?) when 37signals
announced that they would no longer work around IE6's limitations in
Basecamp. A lot of people presented the above argument in the support
forums and they said, "We've analyzed our logs and we know how many of
our users run IE6, and it's not very many".

My preference is to make sure my stuff is functional in IE6, but to
forget about pixel-perfect. But I tend to go light on Javascript in
general, so it's not that big of a deal usually.

Ben

--- End Message ---
--- Begin Message ---
Yes, there is A LOT.

to make u aware that this is the last version be able to run under windows
2000. windows 2000 however is the last professional version of windows made
by microsoft. I don't know any bigger company using other os. All banks,
stock traders (wall street etc.) are still using 2k. Microsoft wanted in
2005 to stopp maintaining 2k but still until today they improving the os.

preventing IE6 from viewing ur sites is cutting away all professional window
users.

ralph_def...@yahoo.de

""HallMarc Websites"" <m...@hallmarcwebsites.com> wrote in message
news:!&!aaaaaaaaaaayaaaaaaaaacoynf9yfjpghykdv3koofzcgaaaeaaaaa6vnkzo3vbkpufhofaqolobaaaaa...@hallmarcwebsites.com...
> Wow. IMHO that is a really bad stance to take on IE 6. Most offices still
> have IE 6 for whatever reason. If you block them then you are blocking
> possible clients. There is still a large percentage that still use it.
>
>
> Thank you,
> Marc Hall
> HallMarc Websites
> 610.446.3346
>
> > -----Original Message-----
> > From: Philip Thompson [mailto:philthath...@gmail.com]
> > Sent: Thursday, September 17, 2009 1:56 PM
> > To: PHP General list
> > Subject: Re: [PHP] ie6 "memory could not be read" help!
> >
> > On Sep 17, 2009, at 4:04 AM, Ashley Sheridan wrote:
> >
> > > On Thu, 2009-09-17 at 16:41 +0800, Shelley wrote:
> > >> Hi all,
> > >>
> > >> With IE6,
> > >>
> > >> After the pages i developed was loaded, there seems to be no
> > problem,
> > >> but when you then click a link, refresh the page, etc. it shows
> > >> "memory
> > >> could not be 'read'" error message.
> > >>
> > >> However, when you load other sites, google.com, for example, there
> > >> is no
> > >> such problem.
> > >>
> > >> Anybody knows how to fix this problem?
> > >>
> > >> Any help is appreciated & thanks in advance.
> > >>
> > >
> > > http://support.microsoft.com/kb/899811
> > >
> > > first result from a Google search
> > >
> > > Thanks,
> > > Ash
> >
> > Since this post is not PHP-related, I'll continue the trend. Are
> > people still using IE6? In sites I design, I prevent the user from
> > viewing it. If they're still on IE6, I don't want them to use my sites.
> >
> > Cheers,
> > ~Philip
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > __________ Information from ESET Smart Security, version of virus
> > signature database 4434 (20090917) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
>
>
>
> __________ Information from ESET Smart Security, version of virus
signature
> database 4434 (20090917) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>



--- End Message ---
--- Begin Message ---
On Thu, Sep 17, 2009 at 12:56:09PM -0500, Philip Thompson wrote:

> On Sep 17, 2009, at 4:04 AM, Ashley Sheridan wrote:
>
>> On Thu, 2009-09-17 at 16:41 +0800, Shelley wrote:
>>> Hi all,
>>>
>>> With IE6,
>>>
>>> After the pages i developed was loaded, there seems to be no problem,
>>> but when you then click a link, refresh the page, etc. it shows
>>> "memory
>>> could not be 'read'" error message.
>>>
>>> However, when you load other sites, google.com, for example, there
>>> is no
>>> such problem.
>>>
>>> Anybody knows how to fix this problem?
>>>
>>> Any help is appreciated & thanks in advance.
>>>
>>
>> http://support.microsoft.com/kb/899811
>>
>> first result from a Google search
>>
>> Thanks,
>> Ash
>
> Since this post is not PHP-related, I'll continue the trend. Are
> people still using IE6? In sites I design, I prevent the user from
> viewing it. If they're still on IE6, I don't want them to use my sites.

I bought a Windows XP PC about three years ago with IE6 on it (I
normally do all my work in Linux). I haven't upgraded it, and I can't
imagine why the average user would. If it ain't broke (and most users
wouldn't consider IE6 broken), don't fix it.

I will say this, though. Since I normally browse with Firefox on Linux,
if a site gets pissy with me and insists I use IE or Mozilla on Windows,
I typically don't go there anymore. So if you're interested in driving
off people who are less technologically advanced than you'd like, I
think you'll probably succeed.

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
On Thu, 2009-09-17 at 20:56 +0200, Ralph Deffke wrote:
> Yes, there is A LOT.
> 
> to make u aware that this is the last version be able to run under windows
> 2000. windows 2000 however is the last professional version of windows made
> by microsoft. I don't know any bigger company using other os. All banks,
> stock traders (wall street etc.) are still using 2k. Microsoft wanted in
> 2005 to stopp maintaining 2k but still until today they improving the os.
> 
> preventing IE6 from viewing ur sites is cutting away all professional window
> users.
> 
> ralph_def...@yahoo.de
> 
> ""HallMarc Websites"" <m...@hallmarcwebsites.com> wrote in message
> news:!&!aaaaaaaaaaayaaaaaaaaacoynf9yfjpghykdv3koofzcgaaaeaaaaa6vnkzo3vbkpufhofaqolobaaaaa...@hallmarcwebsites.com...
> > Wow. IMHO that is a really bad stance to take on IE 6. Most offices still
> > have IE 6 for whatever reason. If you block them then you are blocking
> > possible clients. There is still a large percentage that still use it.
> >
> >
> > Thank you,
> > Marc Hall
> > HallMarc Websites
> > 610.446.3346
> >
> > > -----Original Message-----
> > > From: Philip Thompson [mailto:philthath...@gmail.com]
> > > Sent: Thursday, September 17, 2009 1:56 PM
> > > To: PHP General list
> > > Subject: Re: [PHP] ie6 "memory could not be read" help!
> > >
> > > On Sep 17, 2009, at 4:04 AM, Ashley Sheridan wrote:
> > >
> > > > On Thu, 2009-09-17 at 16:41 +0800, Shelley wrote:
> > > >> Hi all,
> > > >>
> > > >> With IE6,
> > > >>
> > > >> After the pages i developed was loaded, there seems to be no
> > > problem,
> > > >> but when you then click a link, refresh the page, etc. it shows
> > > >> "memory
> > > >> could not be 'read'" error message.
> > > >>
> > > >> However, when you load other sites, google.com, for example, there
> > > >> is no
> > > >> such problem.
> > > >>
> > > >> Anybody knows how to fix this problem?
> > > >>
> > > >> Any help is appreciated & thanks in advance.
> > > >>
> > > >
> > > > http://support.microsoft.com/kb/899811
> > > >
> > > > first result from a Google search
> > > >
> > > > Thanks,
> > > > Ash
> > >
> > > Since this post is not PHP-related, I'll continue the trend. Are
> > > people still using IE6? In sites I design, I prevent the user from
> > > viewing it. If they're still on IE6, I don't want them to use my sites.
> > >
> > > Cheers,
> > > ~Philip
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > > __________ Information from ESET Smart Security, version of virus
> > > signature database 4434 (20090917) __________
> > >
> > > The message was checked by ESET Smart Security.
> > >
> > > http://www.eset.com
> > >
> >
> >
> >
> > __________ Information from ESET Smart Security, version of virus
> signature
> > database 4434 (20090917) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> 
> 
> 
I'd go to say that for general websites, things like the failed PNG
transparency issue in IE6 can be ignored. Yes, your sites will look a
bit rubbish in the browser if you use a lot of transparent PNGs for
visual effects, but it will remain functional. That is not so if your
site relies too heavily on some functions of Javascript. At the end of
the day, stats are meaningless unless they apply to your own site.

Thanks,
Ash
http://www.ashleysheridan.co.uk




--- End Message ---
--- Begin Message ---
I wonder what should happen if your customers will ask you PHP 3 applications 
because their internal server is that old ... and I mean your *current* 
application for PHP3 ... well, IE 6 has the same impact for the Web Development.
I am not saying we can dismiss its support, specially if we work behind banks 
or big lazy but somehow well paid companies administrators whose do not truly 
need internet related business, otherwise they would have updated ages ago to 
something more robust, with better performances, standards support, and more 
powerful, but at least we should never encourage our customers to keep using 
it, they are simply slowly cutting their self out of the web and every 
possibility it could offer.

Security and Legacy? IE6 is the most bugged browser in the history of the web, 
so this is another reason to do not encourage our customers.

Regards

_________________________________________________________________
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1

--- End Message ---
--- Begin Message ---
> I bought a Windows XP PC about three years ago with IE6 on it (I
> normally do all my work in Linux). I haven't upgraded it, and I can't
> imagine why the average user would. If it ain't broke (and most users
> wouldn't consider IE6 broken), don't fix it.

I agree in general, but eventually Microsoft will stop releasing
security updates for IE6. It's hard to tell exactly, but right now it
seems like that may happen next July:
http://support.microsoft.com/gp/lifesupsps/#Internet_Explorer

At that point I would consider IE6 "broke".

Ben

--- End Message ---
--- Begin Message ---

> At that point I would consider IE6 "broke".

Every standard conformance test can tell you since years that IE6 is broken. At 
that point, you'll be exactly in the same situation, if your customers do not 
want to update for same reason they are not doing right now, why would you 
leave them "alone" next July when everybody is screaming against that horror 
software.

IE6 had glorious days 7 years ago, now it's like complaining that petrol 
stations do not sell carbon to go anymore ... the utopia is: if tomorrow 
everybody will stop to support IE6 these deprecated companies will have to 
update - it works with everything, marketing speaking, it does not work with 
IE6, 'cause it's Microsoft marketing.

Finally, apparently IE6 support is reminded until 2014, but for "support" they 
mean only major security problems with zero fixes about leaks, render engine, 
JScript, CSS support, etc etc ... but of course with SilverLight everything 
will be fantastic and still Microsoft Approved, they are simply doing their 
business, and we are simply passively following it.

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx

--- End Message ---
--- Begin Message ---
Andrea Giammarchi wrote:

At that point I would consider IE6 "broke".

Hahah... it was broken at the starting gate... probably by design.

Every standard conformance test can tell you since years that IE6 is broken. At that 
point, you'll be exactly in the same situation, if your customers do not want to update 
for same reason they are not doing right now, why would you leave them "alone" 
next July when everybody is screaming against that horror software.

IE6 had glorious days 7 years ago, now it's like complaining that petrol 
stations do not sell carbon to go anymore ... the utopia is: if tomorrow 
everybody will stop to support IE6 these deprecated companies will have to 
update - it works with everything, marketing speaking, it does not work with 
IE6, 'cause it's Microsoft marketing.

Finally, apparently IE6 support is reminded until 2014, but for "support" they 
mean only major security problems with zero fixes about leaks, render engine, JScript, 
CSS support, etc etc ... but of course with SilverLight everything will be fantastic and 
still Microsoft Approved, they are simply doing their business, and we are simply 
passively following it.

In a lot of the work I do these days I have to support IE6 because it's the defacto browser in various government departments. It'll be sometime before it is completely ousted.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--- End Message ---
--- Begin Message ---

> In a lot of the work I do these days I have to support IE6 because it's 
> the defacto browser in various government departments. It'll be sometime 
> before it is completely ousted.

Rob, same is for me, I have to deal with this "browser" all problems it has 
every single day, 'cause financial companies would like to have the last 
fashion web based application ignoring they are using the worse case scenario 
browser.

We tried to drop IE6 support for at least version 7 when 8 became official ... 
and you know what? Absolutely nothing changed, it's like to deal with Windows 
Millennium when you are trying to develop an anti virus with firewall ... a 
massive waste of time. Fortunately these company still have money to pay extra 
hours and effotr for IE6 ... so I do my job, and that's it.

Regards

_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

--- End Message ---
--- Begin Message ---
Hello there,
Thanks a lot. The Javascript class worked like a charm. I'm glad I asked! :)
Thanks for all the answers, everyone. I seem to have communicated my intent 
wrong, when it came to my algorithm, but basically, yes, it was not based on 
the MVC model, and yes, it did filter the SQL table, then sorted them and 
displayed each row according to the ID, for example, of the different things 
in the SQL table. In other words, let's say that I wanted to get the ID, 
sort the array containing the ID's, then show the rows of the table by 
looping through the array and showing each row of the table.
However, the javascript did what I wanted perfectly anyway. I have to read 
up more on Javascript since I seem to have an awful understanding of it, but 
for now... *phew* hehe!

-- 
---
Contact info:
Skype: parham-d
MSN: fire_lizard16 at hotmail dot com
GoogleTalk: parha...@gmail.com
Twitter: PD90
email: parham90 at GMail dot com
"Jim Lucas" <li...@cmsws.com> wrote in message 
news:4aadec1e.60...@cmsws.com...
> Parham Doustdar wrote:
>> Hello there,
>> I've been asked to create something like the tables you usually see, 
>> where the headers are actually links and when you click the links, the 
>> table gets sorted based on the header. Are there any classes that you 
>> know of that would do the job? My current idea is to return an array of 
>> the colomn which contains the data you want to sort on (like 'name') then 
>> sort the array and do something like:
>> [code]
>> for (i = 0; i < length(array); i++)
>> mysql_query("select * from table where 'name' = ${aray[i]}");
>> [/code]
>> Any better algorithms anyone?
>> Thanks!
>
> My suggestion would be to have the client do it.
>
> http://www.js-vault.us/iscripts/007.html
>
> I use it on a number of different pages.
> -- 
> Jim Lucas
>
>    "Some men are born to greatness, some achieve greatness,
>        and some have greatness thrust upon them."
>
> Twelfth Night, Act II, Scene V
>     by William Shakespeare 



--- End Message ---
--- Begin Message ---
> I was afraid it was a bug. I have generally just used whatever is at
> whatever host, until this project, and didn't really think something so
> glaring could be in there. WTF!

I wonder if massive uploads, like the ones you're coding for, really
aren't that common. I can imagine hard-coding that 3600 myself, and
thinking, "no way someone's going to be uploading a single file for
longer than an hour, or even close to it."

> So, it seems like it would be pretty straight forward to fix this, if I was
> willing to run on a custom version until this fix is released. Do people do
> that? What do you think?

After looking at it bit more, I found another PECL bug, same basic
underlying problem, that was fixed almost a year ago:
http://pecl.php.net/bugs/bug.php?id=14198

That's when the config option apc.rfc1867_ttl was introduced to APC --
but some of that hardcoded 3600 remained until a few weeks ago.

The older bug (14198) sounds exactly like your problem, so if I were
you I'd start by trying any of the official versions that include the
fix for 14198. That fix was committed on August 29 of 2008:
http://svn.php.net/viewvc?view=revision&revision=265595

So the next version up (3.1.1) from what you're currently using will
include it. I guess 3.1.1 is still in "beta" but I'd personally go for
beta over a custom build, at least on a first pass.

Ben

--- End Message ---
--- Begin Message ---

> I wonder if massive uploads, like the ones you're coding for, really
> aren't that common. I can imagine hard-coding that 3600 myself, and
> thinking, "no way someone's going to be uploading a single file for
> longer than an hour, or even close to it."

me too, also because for a silly connection problem you could even re-start the 
upload from the scratch.
I do not think HTTP and a POST form "as is" is suitable for these kind of 
tasks, I would rather think about a truly simple Desktop software, Python for 
portability or  AutoIT if it is only for windows, able to split the file in 
chunks 2 Mb each and open a conversation with the server in order to be able to 
resume the upload if something goes wrong or if the user would like to.

With a desktop application you can send credentials and the SHA1 of the file in 
order to create it's ghost image on the server. Every chunk will be saved a 
part and when finished appended via file pointers to the main one. To allow a 
resume you simply need to communicate the current big file size / 2 Mb and you 
know which chunk needs to be uploaded.

It is more simple to do than to explain, if you got this basic example about 
how to proceed, but you need privileges over the file in order to create a SHA1 
and read only chunks via pointer, rather than send everything in a shot.

Regards

_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

--- End Message ---
--- Begin Message ---

On Sep 17, 2009, at 2:09 PM, Andrea Giammarchi wrote:



I wonder if massive uploads, like the ones you're coding for, really
aren't that common. I can imagine hard-coding that 3600 myself, and
thinking, "no way someone's going to be uploading a single file for
longer than an hour, or even close to it."

me too, also because for a silly connection problem you could even re-start the upload from the scratch. I do not think HTTP and a POST form "as is" is suitable for these kind of tasks, I would rather think about a truly simple Desktop software, Python for portability or AutoIT if it is only for windows, able to split the file in chunks 2 Mb each and open a conversation with the server in order to be able to resume the upload if something goes wrong or if the user would like to.

With a desktop application you can send credentials and the SHA1 of the file in order to create it's ghost image on the server. Every chunk will be saved a part and when finished appended via file pointers to the main one. To allow a resume you simply need to communicate the current big file size / 2 Mb and you know which chunk needs to be uploaded.

It is more simple to do than to explain, if you got this basic example about how to proceed, but you need privileges over the file in order to create a SHA1 and read only chunks via pointer, rather than send everything in a shot.

Regards

Woo hoo!

Got php-apc patched and am testing now.

Good points about long downloads, but right now folks are using FTP and they don't like it or understand it. In a biz environment, connections are pretty stable, and usually fairly fast. This gives them a familiar interface to upload. Anyway, this was the spec I was given. Adding interruption recovery is a nice phase 2, upgrade.

I am just happy it is working now. The APC upload progress thing works great (above mentioned limitations aside). Long haul, but pretty slick in the end.

Thanks again for all y'alls help.

Phred

--- End Message ---
--- Begin Message ---
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>

--- End Message ---
--- Begin Message ---
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




--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Thursday, September 17, 2009 3:19 PM
> To: saeed ahmed
> Cc: php-gene...@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
 


--- End Message ---
--- Begin Message ---

> 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.

And I am sure Ash does it on daily basis, the problem is the used therm: I want 
to *assign* ... not pass, assign!

I am quite sure that is what he meant, since I cannot count people reading 
<?php ?> in the middle of the page thinking it can interact directly with nodes 
and javascript, and being "a new one", I think Ash replied in the correct way.

Regards

_________________________________________________________________
Share your memories online with anyone you want.
http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1

--- End Message ---
--- Begin Message ---

On Sep 17, 2009, at 2:43 PM, Andrea Giammarchi wrote:



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.

And I am sure Ash does it on daily basis, the problem is the used therm: I want to *assign* ... not pass, assign!

I am quite sure that is what he meant, since I cannot count people reading <?php ?> in the middle of the page thinking it can interact directly with nodes and javascript, and being "a new one", I think Ash replied in the correct way.

Regards

All true, and probably appropriate to clarify the relationship between php and js.

However, if the goal is to pre-set something in php land so you don't have to pass it with your next page navigation, you could use ajax to to pass the value to a simple php script that in turn updates a php session variable, so that it is already set when you do your next real page load.

You would still be "calling a page" technically, but your current displayed page would remain in place and php would have the value available on its next page load.


--- End Message ---
--- Begin Message ---
> >> 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.
> >
> > And I am sure Ash does it on daily basis, the problem is the used
> > therm: I want to *assign* ... not pass, assign!
> >
> > I am quite sure that is what he meant, since I cannot count people
> > reading <?php ?> in the middle of the page thinking it can interact
> > directly with nodes and javascript, and being "a new one", I think
> > Ash replied in the correct way.
> >
> > Regards
> >
> All true, and probably appropriate to clarify the relationship between
> php and js.
> 
> However, if the goal is to pre-set something in php land so you don't
> have to pass it with your next page navigation, you could use ajax to
> to pass the value to a simple php script that in turn updates a php
> session variable, so that it is already set when you do your next real
> page load.
> 
> You would still be "calling a page" technically, but your current
> displayed page would remain in place and php would have the value
> available on its next page load.
> 

Very true. I really didn't intend to dismiss everything you said Ash. I
apologize for that. You were absolutely correct in your statement about not
being able to directly assign the value of a javascript variable to a PHP
variable. I just felt that your response would leave the reader to believe
that that wasn't any way to pass the value at all. In my attempt to throw my
two cents in I essentially did the same to your response. I'm afraid I left
some thinking I was dismissing your entire statement. Sorry about that.



Thank you,
Marc Hall
HallMarc Websites
610.446.3346


[HallMarc Websites] 
 

__________ Information from ESET Smart Security, version of virus signature
database 4435 (20090917) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


--- End Message ---
--- Begin Message ---
hello,
     
You can also try using AJAX technology to communicate with the server
side code that is your php :).

Regards,
Gautam Bhatia
Punjab,India
mail2gautambha...@gmail.com


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>


--- End Message ---

Reply via email to