pull data from a site and place it in a form

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
inosent1
Forum Commoner
Posts: 97
Joined: Wed Jan 28, 2009 12:18 pm

pull data from a site and place it in a form

Post by inosent1 »

my users comes to a field that asks for a value.

from the form they enter an address.

what i want to to grab that address from the form, get the value from another site, and add the value to the field.
User avatar
Robert07
Forum Contributor
Posts: 113
Joined: Tue Jun 17, 2008 1:41 pm

Re: pull data from a site and place it in a form

Post by Robert07 »

If you want to display the data from another site in your form before the user submits the form you can use ajax, is that what you're trying to do? Please be more specific.
x_mutatis_mutandis_x
Forum Contributor
Posts: 160
Joined: Tue Apr 17, 2012 12:57 pm

Re: pull data from a site and place it in a form

Post by x_mutatis_mutandis_x »

inosent1 wrote:my users comes to a field that asks for a value.
sorry but that sounded dirty lol
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: pull data from a site and place it in a form

Post by califdon »

inosent1 wrote: get the value from another site
What does that mean? Do you mean use an API to look up a postal code, for example? How will the value be obtained?

If that is what you want to do, yes, use AJAX to call your PHP script that employs the API to look up the value, then returns that value to the Javascript function in your form page and inserts it where needed.
Post Reply