0
<form id="form1" name="form1" align="center" action="http://www.test.org/add-listing/?listing_type_id=test" method="POST" enctype="multipart/form-data">

<input type="file" Value="UPLOAD RESUME" id="UploadResume" name="UploadResume" >
<br>
<input type="submit" Value="Upload Resume" id="SubmitResume" >
</form>

I am trying to post form data to another page; however, it seems like it is trying to go to http://www.test.org/add-listing

instead of

http://www.test.org/add-listing/?listing_type_id=test

is there something i'm missing here?

McCormick32
  • 185
  • 11
  • _it seems like_ - what makes you think so? Some browsers/dev tools will try to prettify a url by hiding the querystring, an example being Opera. It appears that's the issue or the server side is redirecting. – MrCode Feb 17 '15 at 19:48
  • The URL still shows http://www.test.org/add-listing/?listing_type_id=test ; however, the content on the page is what is on http://www.test.org/add-listing. – McCormick32 Feb 17 '15 at 19:52

1 Answers1

1

You form method is POST so you can't pass data through GET (URL)

If you want to pass that value, you can use hidden inputs :

<input type="hidden" name="listing_type_id" value="test">

You will be able to get it on the other side with $_POST["listing_type_id"]

AdrienXL
  • 3,008
  • 3
  • 23
  • 39
  • I'm not trying to use GET to pass the file. I am trying to use POST and the listing_type_id=test in the URL is not me trying to use the GET method it is the page I am trying to send the information to. the whole URL is http://www.test.org/add-listing/?listing_type_id=test but it seems to stop at http://www.test.org/add-listing/ without being able to pass it all the way to http://www.test.org/add-listing/?listing_type_id=test – McCormick32 Feb 17 '15 at 19:40
  • A web form can't be used to send a request to a page that uses a mix of GET and POST. If you set the form's method to GET, all the parameters are in the query string. If you set the form's method to POST, all the parameters are in the request body. ([More details](https://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not/612022#612022)) – AdrienXL Feb 17 '15 at 19:42
  • @AdrienXL it's perfectly acceptable to send a POST request that includes querystring parameters. – MrCode Feb 17 '15 at 19:48