POST without 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
bcgreen
Forum Newbie
Posts: 1
Joined: Mon Jun 21, 2004 9:51 pm

POST without form?

Post by bcgreen »

I have a form that I'm using to gather comments from website visitors, which are then emailed to the appropriate recipient. In order to "hide" the recipient's email address in the HTML from spambots, I'm prefixing it with a series of characters which I am then stripping off using a PHP script.

So....the form's info is being POSTED to the PHP script....the recipient's email address is converted to the proper address and stuffed into a variable. All the form's fields now need to be sent to a cgi program for mailing--- how can I POST the forms fields from my PHP script to the cgi program? I know it's probably a simple thing, but I am too new to PHP to figure it out, and am having difficutly sorting through the various tutorials I've found....

Thanks!
Bryan
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

You can mail in php using the mail() function - http://uk.php.net/mail - which would make it alot easier as you can send the email from the php script.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Another option is to take a look at the [php_man]curl[/php_man] functions that PHP provides. I have written a few scripts which basically send POST requests based on some variables that I set. It works like a charm.
Post Reply