Forum Moderators: coopster

Message Too Old, No Replies

User form to database

how do I do this with PHP?

         

Neo541

9:59 pm on Apr 14, 2003 (gmt 0)

10+ Year Member



I've got a form now (through Frontpage), where the user fills out a few fields, essentially requesting information. This form is then emailed to them, but then is also saved in a CSV format for use with other programs.

Unfortunately, we are switching hosts, and I need to do this through PHP. Is this possible? If so, where do I go for information on this? I'm not even sure what it's called, so it's hard to even search for the info...

Thanks for all your help!

DrDoc

11:12 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried php.net [php.net]?

Search for "file write" in the online documentation... It should give you some initial pointers.

jatar_k

11:12 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



where do I go for information on this

You are already here!

Is this possible?

With php anything is possible. ;)

The be all end all resource for php is [php.net...]

You could use fopen [php.net] to open the csv file you want to write to
fwrite [php.net] to write the values passed from the form to that file
if your form is using the post method then the values passed from your form will be available in the $_POST [php.net] superglobal associative array

you must then create the email message from those same variables/values and put it into the mail [php.net] function.

That is a pretty basic overview but I hope that helps you get started at least. Then you can post questions as/if you run into obstacles.

Neo541

4:56 pm on Apr 15, 2003 (gmt 0)

10+ Year Member



Okay, I checked over that info, and I am LOST! :)

Unfortunately, we've got to get this done soon.

Thanks!

[edited by: jatar_k at 5:21 pm (utc) on April 15, 2003]

kawikadave

5:13 pm on Apr 15, 2003 (gmt 0)

10+ Year Member



I'd recommend the many sites that have free scripts for this kind of stuff. You could do a Google search for something like "php form script". Personally I find a lot of stuff on Hotscripts.