Hi,
Our website is hosted at an external ISP. I am unaware as to how I can accomplish the following and am hoping you can help.
The ISP uses a Formmail.pl script in order to email forms. My user requirements indicate that in addition to an email being sent, I also need to store the form fields in a MYSQL Database. I have been successful in writing to the database but am not sure how to incorporate this emailing action in the existing php script. Prior to adding the mysql component, we only had ACTION="/cgi-sys/formmail.pl" in the form tag.
Is this even possible?
Thanks,
newbie question about PHP and CGI
Moderator: General Moderators
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
lol, here's a NASTY way of getting what you need done.
Change the ACTION to a php script you write.
Process your form with the php script and insert relevant data into the database.
Then, using php, echo out the html to create a form, with hidden fields used to hold the data you just submitted.
Then, use JavaScript to submit the form to the formmail.pl script.
I don't recommend it, but it'll work.
Change the ACTION to a php script you write.
Process your form with the php script and insert relevant data into the database.
Then, using php, echo out the html to create a form, with hidden fields used to hold the data you just submitted.
Then, use JavaScript to submit the form to the formmail.pl script.
I don't recommend it, but it'll work.
the formmail file is a Perl file
I've tried using exec to no avail. I don't know what to do . There must be an easier way to call a perl script from within a PHP script.