You are here: Re: Is there a reverse $_GET? « PHP Programming Language « IT news, forums, messages
Re: Is there a reverse $_GET?

Posted by Tim Streater on 03/09/06 15:27

In article <20060309092050.09166c90.juanjo@iteisa.com>,
Juan Josι Gutiιrrez de Quevedo Pιrez <juanjo@iteisa.com> wrote:

> El 8 Mar 2006 22:44:54 -0800
> VHfc escribiσ:
>
> > Then I'm stuck, since I need the content of $txt back in my JS, either
> > in a global JS variable or as the value in a <textarea>, whatever.
> > I tried the cookie mechanism, writing $txt as an escaped string in a
> > cookie in the PHP snipplet, then reading that cookie back in JS and
> > unescape it. That worked fine, but...
>
> well, and why don't you just output inside a textarea?, something like
>
> echo "<textarea>$txt</textarea>";
>
> if you don't want to see it you can just hide it using css
>
> you can also use a hidden field for this:
>
> echo "<input type=\"hidden\" id=\"txt var\" value=\"$txt\"/>";

This is the sort of technique I use too, where I have to use PHP to get
data I need from a mysql database, but then manipulate it in JavaScript
before using PHP to write it back to mysql.

The values I get from mysql are written into a form with hidden
variables, and their values then picked up with an onload function to be
put into JS variables. The new values are then later loaded into hidden
form variables, and picked up by the next page as PHP values in order to
be written back to the database.

-- tim

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация