[thelist] javascript variable in php

Bob Meetin bobm at dottedi.biz
Wed May 27 10:28:47 CDT 2009

Anthony, Jack ,all,

After I emailed the question I read a post I found in google saying that 
you have to use cookies to do what I am asking.  Anyway, this is not an 
urgent need, just something to add to a bag of tricks.

For the purposes of CSS I can use the IE browser IF statements to manage 
the page.  But say that I have a php script that contains a db query and 
I want to adjust the query according to the browser. 

$query = "select * from $table";

<!--[if IE6]>
  <link rel='stylesheet' type='text/css' href='ie6_styles.css' title='stylesheet'> <!-- this is no brainer -->
  <?php $query = "select * from $table where IE6 = 1;" ?> <!-- passing this along is the part that requires brain cells -->



Anthony Baratta wrote:
> Bob Meetin wrote:
>> I have a script that does a simple javascript test.  How would I set up 
>> a variable that can be used in a following PHP test, say set state = 
>> positive?
> test.php?var=value

> Is that what you're looking for?Do you want the JS script to use a PHP Variable value generated when the 
> page is processed by the web server, or a PHP Variable to use a result 
> generated from the JS Script executing on the browser?
> --
> Anthony Baratta
> "Everything that deceives may be said to enchant." ---Plato

Bob Meetin

On www.Twitter.com/bobmeetin, Facebook, www.linkedin.com/in/bobmeetin, or catch my blog at www.dottedi.biz/blog.php

Standards - you gotta love em - with so many to choose from!

More information about the thelist mailing list