...

View Full Version : post-like hyperlink



Sidon
06-24-2006, 12:28 AM
I need to make a text link (hyperlink) witch call my php script.
BUT i need to use POST method. (no variables in url)

i need this look:

<a href="script.php?page=2">next page</a>
.. but this funcionality:

<form action="script.php" method="post">
<input name="page" type="hidden" value="2" />
<input type="submit" value="next page" />
</form>

please help.

chump2877
06-24-2006, 07:52 AM
you need some javascript and an invisible HTML form....

the link:


<a href="javascript: window.document.form1.submit();">next page</a>

the invisible form:


<form name="form1" action="script.php" method="post">
<input name="page" type="hidden" value="2" />
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum