On Mon, 28 Jul 2003 12:48:04 +0200 [EMAIL PROTECTED] (Roman Duriancik) wrote:
> I have problem with variables in javascript and php. > I have code in php and in this code I insert some values from javascript.: > > $color = "<script><!-- > document.write(screen.colorDepth) > //--> > </script>"; > > > when I write command echo $color - result is correct. > > but when i need insert or select some values from database with this > value ($color) result is not correct You are doing it just wrong. The PHP-code is executed and returns the html-page (with the JS-code if you use the print/echo command) to the user Afterwards the JavaScript-Code is executed ON THE CLIENT and shows the color in the page. So the color never reaches the php-script. Get a good book on how JavaScript works at all. thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php