You are here: Re: HTTP POST from PHP using a link « PHP Programming Language « IT news, forums, messages
Re: HTTP POST from PHP using a link

Posted by The Natural Philosopher on 10/01/63 12:00

trpost@gmail.com wrote:
> This is exactly what I needed, just a way to dynamically submit POST
> data based on a link clicked. Thanks for all for contributing, code
> below is adapted from (The Natural Philosopher) above.
>
>
> a.php:
>
> <script>
> function submitCases (p)
> {
> document.getElementById("p1").value=p;
> document.getElementById('caseSubmit').submit();
> }
> </script>
>
> <form method="post" id="caseSubmit" action="b.php">
> <INPUT type="hidden" name="postvariable1" id="p1" value="">
>
> <span onclick="submitCases('bla, bla, bla');">span</span>
> </form>
>
>
>
> b.php:
> <?php
>
> echo "<PRE>";
> var_dump($_POST);
> echo "</PRE>";
>
> ?>

Bice of you to debug it..DO test it against ALL browsers.

 

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

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