PHPFormGen Question

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
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

PHPFormGen Question

Post by comtek »

I have been manulally tweaking a form that I created using PHPFormGen. I have added text fields, drop downs, and radio's sucessfully, but when I try to add a file, the following shows up on my email and I can't seem to find it on my server either. Is there anyway to have the file attached to or in the email and also have it stored on my server?

Field 51:
Field 52:
Field 53:
Field 54: /tmp/php0UoHdC


Field 54 should be the file.

Thanks.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You're going to have to modify the code that you are using to create the e-mail and handle the form. Uploading files and sending them by e-mail is more complicated than just sending text.

Mac
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post by comtek »

Thanks. I actually was forgetting some code, and had the rights to the storage directory wrong. It now sends an email with a link to the file that has been stored on my web server.

Two more questions.

1. If a person fills out a form and leaves off required fields, hits submit, then upon recieving the a list of errors of what was missed, hits "back", the form is reset. How can it be setup to hold the information entered so it does not have to be re-typed? Are cookies the answer?

2. Is it possible to have the uploaded file attached to the outgoing email as well as having it stored on the server?

Thanks.
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post by comtek »

I think I have found a possible solution to #2 - would the "fileatt" be the correct way to go?

And a possible solutions to #1 - Sessions?

Can anyone recommend a good PHP reference list?

Thanks
Post Reply