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 trpost on 10/04/00 12:00

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>";

?>

 

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

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