...

View Full Version : resending



boeing747fp
11-24-2003, 09:12 PM
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?

ReadMe.txt
11-24-2003, 10:21 PM
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....

missing-score
11-24-2003, 10:39 PM
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. :rolleyes:

boeing747fp
11-24-2003, 10:57 PM
that dont help me



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum