|
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]
|