Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question post-like hyperlink

    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:
    Code:
    <a href="script.php?page=2">next page</a>
    .. but this funcionality:
    Code:
    <form action="script.php" method="post">
    <input name="page" type="hidden" value="2" />
    <input type="submit" value="next page" />
    </form>
    please help.

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    you need some javascript and an invisible HTML form....

    the link:

    Code:
    <a href="javascript: window.document.form1.submit();">next page</a>
    the invisible form:
    Code:
    <form name="form1" action="script.php" method="post">
    <input name="page" type="hidden" value="2" />
    </form>
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •