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 4 of 4

Thread: resending

  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    resending

    i have a search form that has 2 radio buttons on it and depending on which one is selected, i want it to search either my store or Amazon.com. however, amazon.com's search uses POST and i use GET.

    i have it set up a page where the form is sent to and it has this code

    <?php
    $q = $_GET['q'];
    if($_GET['area'] == "here"){
    header("location: search.php?q=$q");
    }
    if($_GET['area'] == "amazon"){
    HERE IS WHERE I RUN INTO TROUBLE!
    -----
    is there any way i can resend the form thro different methods and actions?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    javascript is your best bet here:

    <form id="submitThis" method='GET'>
    <input type="submit" name="submit" value="Amazon" onclick="document.getElementById('submitThis').method = 'POST'" />
    <input type="submit" name="submit" value="My Site" onclick="document.getElementById('submitThis').method = 'GET'" />
    </form>

    not sure if POST vars get passed using an HTTP redirect tho....
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no, they dont as far as i know.

    i believe there is a way using fsockopen() to send a post request to another site, however, im not sure how, or if it is appropriate here. sorry.

  • #4
    Regular Coder
    Join Date
    Oct 2003
    Posts
    603
    Thanks
    2
    Thanked 1 Time in 1 Post

    nope

    that dont help me


  •  

    Posting Permissions

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