Feed information into an HTML form to get a result

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
Termina
Forum Newbie
Posts: 18
Joined: Sat Apr 10, 2004 11:17 pm

Feed information into an HTML form to get a result

Post by Termina »

I'm trying to send a name to a form (that is located on another server I don't have any control over), in order to gain a piece of information.

I would search for a name, and this other form would return a result. The example name I'm using is 'Michael Goll'.

I'm trying to grab the email address that is associated with this name.

I have an HTML form that at least lets me search on my own... but it's not very helpful. :)

Can anyone show me how to do this with PHP? Thanks!

To sum it up:

1) You enter in a name, press enter
2) Name is sent to this website, and an email address is shown
3) Email address is put in a variable for later use

Code: Select all

<html>
<form action="http://www.uwp.edu/search/" id="search" type="keyword"  method="POST">
<input id="directory" type="text" name="keywords">Card<br>
<input type="text" name="searchtype" id="directory" value="directory" />
    <label for="directory">Phonebook/Directory</label> <br />
<input type="submit" />
</form>
</html>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

curl is your friend.
Post Reply