Page 1 of 1

pls help me

Posted: Mon Aug 19, 2013 9:00 am
by soladoye
Hello
Please. I need to query an API using a Query string my problem is how i can make the input form add the required vin to the query string befor sending the query to tha API


This is the string that calls the API  https://api.vinaudit.com/query.php?vin= ... format=xml  the vin is just for for sample purpose hence needs to be replaced every time a fresh query is required through the form provided for the query on the front end. I don't know how to get the form to put the vin in the string that calls the api using the post ot get parameter


This is my form code

<form action="https://api.vinaudit.com/query.php?vin= ... format=xml" method="post" name="vin" target="_blank" id="vin">
              <br>
              <table width="653" align="center">
                <tr>
                  <td colspan="2"><img name="index_17" src="images/index_17.gif" width="300" height="29" border="0" alt=""></td>
                  <td width="341"><input name="textfield" type="text" size="40">
                      <input type="submit" name="Submit" value="Submit"></td>
                </tr>
              </table>
            </form>


Pls help me I am very. New to php

Re: pls help me

Posted: Mon Aug 19, 2013 9:12 am
by Celauran
Don't have the form post directly to vinaudit.com. They're looking for GET requests anyhow. Post the form to your domain, parse the form fields to build the request URI, then submit that to vinaudit via cURL or somesuch.