php - Force data to a form using post -
i know there no way use query string pass information form uses post method, there other options? trying use link (or button) on 1 website link page on another. in process, url/button needs send information target. target website uses post, can't use query string input data. there sort of button attribute let me send data fields in target website? thank in advance.
edit: should have mentioned cannot use form tag. reason, environment using not allow tags used.
with button:
<form action="http://example.com/target.php" method="post"> <input type="hidden" name="foo" value="bar" /> <input type="submit" /> </form>
with link:
<form id="my_form" action="http://example.com/target.php" method="post"> <input type="hidden" name="foo" value="bar" /> </form> <a href="#" onclick="document.getelementbyid('my_form').submit(); return false;">submit</a>
Comments
Post a Comment