You are here: Re: -> How to read a form variable before posting? <- « PHP Programming Language « IT news, forums, messages
Re: -> How to read a form variable before posting? <-

Posted by shimmyshack on 05/14/07 14:08

On May 14, 2:56 pm, Steve JORDI <steveK_I_L_LSPAMjo...@hotmail.com>
wrote:
> Actually, the following code sample works ok to built
> the href tag dynamically...
>
> <script language="javascript" type="text/javascript">
> function toto() {
> var num = document.getElementById("num") ;
> var ref=document.getElementById("theref") ;
> ref.href="mypage.php?id="+num.value ;
> }
> </script>
>
> <form method="post">
> <INPUT name="num" type="text" id="num" onBlur="toto();">
> <A href="" id="theref">go</a>
> </form>
>
> When I click on "go" the link is correct and point to mypage
> with the id= to the value I have in the edit field.
>
> This allows me to know where to point to before POSTING. That's
> what I need.
>
> Sincerely,
> Steve JORDI
>
> (Remove the K_I_L_LSPAM from my email address)
> ------------------------------------------------
> 1197 Prangins Email: stevejordiK_I_L_LS...@hotmail.com
> Switzerland WWW: www.sjordi.com
> ------------------------------------------------
> Volcanoes at www.sjordi.com/volcanoes
> MovieDB at www.sjmoviedb.com
> ------------------------------------------------

of course you could just post to mypage, and use
$_GET['id'] = $_POST['numform']; //with filtering of course!
if you REALLY need to populate the GET array.

 

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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация