Submit form via php

Previous topic - Next topic

ccordner

I have a scribus form, which I want people to be able to complete and submit electronically.

I have managed this, albeit in a somewhat clunky way, via the submit (and "mailto:xxx@yyy.com"). However, this is no use if they don't have Outlook, Thunderbird etc.

Is it possible to submit the form to an email address via php?

I found a site that promised to help, but couldn't get it to work. I'm not sure if that's because the code wasn't right, or it's because I was trying it on my laptop (offline) first.

Any help would be appreciated.

Chris

a.l.e

all i can tell is: it should work...

for more i need more...

ciao
a.l.e

ccordner

Sorry.

Right, let me try and explain this in a way that makes sense. I got most of this from (http://koivi.com/fill-pdf-form-fields/tutorial.php).

I already have a form, which has umpteen fields on it. I created it with scribus, I set the export type to HTML (And tried it with PDF/FDF with similar results). I created a php file with the code below as suggested:

<?php echo '<pre>'print_r($_POST); echo '</pre>'?>

After much messing around, I saved the php code (called it "submit.php") in the same folder as the form, opened the form in IE7 (and Firefox) and hit "Submit".

All that happened in either case was that the browser then displayed the php code (minus the opening tag) and nothing else.

Is there a reason the browser is displaying the code rather than executing it? If so, could this be linked to the fact that it's just a file on a computer rather than on a web server?

Thanks
Chris

a.l.e

you have to put the php file in a place served by a web server and submit the form through http to that server.

... please get in touch with somebody in your neighborhood who knows a bit about web development and get some help...

... or learn first the basics of php :-)

ciao
a.l.e