Sunday, March 28, 2010

mail forward script too simple

I'm trying to set up my pdf form user-entered data to be sent to my site and then automatically forwarded to my webmail.

(pdf formdata.xml --%26gt; www.mysite.com/userform/forwardphp.ini --%26gt; mymail@mysite.com)?The data is xml files approx 2-3 kb in size each.

The pdf form is fine, my question regards the php script to do the forwarding. I found a sample script in my hunt which seems to be all I need, but as I know next to nothing about php, I'm afraid it might be too simple, just a fragment of a larger script needed to do the job.

%26lt;?php

$txt=formdata.xml;

$txt=wordwrap($txt,70);

mail(''mymail@mysite.com'',''User Data'',$txt);

?%26gt;

I'm also concerned that this tiny script doesn't remove the original xml file it received from the pdf, out of the website userform folder.

I hope someone will help.

mail forward script too simple

RichLorn wrote:

I'm trying to set up my pdf form user-entered data to be sent to my site and then automatically forwarded to my webmail.

(pdf formdata.xml --%26gt; www.mysite.com/userform/forwardphp.ini --%26gt; mymail@mysite.com)

mail forward script too simple

Hi David, thanks for your quick reply

Regarding the .ini file, I'm just showing my ignorance of scripting. Perhaps I should have said feedback.php instead?

The xml data file coming from the Acrobat LiveCycle form works fine. It behaves very similar to a .csv file. They can be imported into excel, or in my case, I simply import each one back into my original pdf form, where it populates the form and I can then print or save the filled in form as a complete pdf. Of course there are other more sophisticated ways of handling form data, but for my purposes this works fine.

When I get back to the office Monday I will add the last line that you suggested, post the script and try it ''live''.

Thanks again. Maybe I should invest in a book, like PHP for Dummies, volumes 1 thru 18? ?As you are knowledgable in the subject, would you care to share with me and others how YOU went about learning php for the first time?

RichLorn wrote:

Maybe I should invest in a book, like PHP for Dummies, volumes 1 thru 18? ?As you are knowledgable in the subject, would you care to share with me and others how YOU went about learning php for the first time?

daves books are the best php books out there!!!

No comments:

Post a Comment