pls help me

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
soladoye
Forum Newbie
Posts: 1
Joined: Mon Aug 19, 2013 8:37 am

pls help me

Post 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
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: pls help me

Post 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.
Post Reply