This is a discussion on "PHP Form Help" within the PHP Forum section. This forum, and the thread "PHP Form Help are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
PHP Form Help
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
OK guys so here's my problem
I'm trying to add a form on my site and I got a PHP mailform code (to send me form results to my e-mail) from http://open.appideas.com/phpMailForm/
to PHP!Please help me to create a working mailform.Please note that the page and the actual form are 2 different htm files! Where do I place.....
Here is a basic idea http://h1.ripway.com/spoink/page.htm and the actual form is http://h1.ripway.com/spoink/form.htm My webservice provider DOES support PHP scripts Please help!! |
|
|
|
||||
|
Re: PHP Form Help
I know this sounds silly, Have you changed the bit that says
Quote:
|
|
|||
|
Re: PHP Form Help
Sorry for the delay.
First of all, in my experiance it is allways easier to write your own scriopt than try and modify and existing one... It takes just as long to make the mods as it would to have taught yourself to write your own With that in mind im going to help you construct a simple mail form from scratch; 1) You need an htlm form to collect your information, create this file... form.php. The form needs to know where to send the information, and for this we are going to use "post", which is just a method for sending values between different pages.
2) As with regular mail, sending it is not enough... it needs to be recieved and used aswell. When you create your form fields, you will "name" them, and it is this "name" that will be associated with the value the user enters. Let us assume you have a field to collect the users name ... we shall conveniantly call this field "name"
create a file called "mail.php" the first stage is to put all of your $_POST values into normall php variables as follwos:
This is relativly easy, and uses a php function called "mail()" heres and example:
You can also add headers and so on to allow you to create dynamic html emails... but that is beyond what im trying to do here. So, we now have all our variables created, and we need to send them.
IMPORTANT NOTE When your playing with the above, and trying to make it work... remember that you need to have a correctly configured email server on the machine from which the emails are to be sent. The easiest way is to use a live host... there are plenty of free ones that have email servers set up..... you can use your local machine... but you will need to manually set up the email server... which can be a little confusing. My advice, find a free host and test it live. ** I hope this has gone somee way to helping you understand... if you ahve any more problems, please come back and ask away Good luck Accura Last edited by Accurax; May 6th, 2007 at 14:12. |
|
|||
|
Re: PHP Form Help
Hey Accurax
Thanx a lot dude Waiting desperately for some help!! PS.mmfraser That was the only thing that I had already figured out(along with Your@Address.Goes.Here and Your Subject here!! |
|
|||
|
Re: PHP Form Help
Hey Accurax
Thanks for your *Precious* help. I'll try to atleast learn the basics of PHP and try the tips U gave me and work on coding my own mailform script. When U say
Here is the Phpinfo() page of the server http://h1.ripway.com/spoink/Phpinfo.php See if the mail server is properly configured!!(I don't understand a thing of it) |
|
|||
|
Re: PHP Form Help
Hey Accurax and all other PHP guru's out there
still waitin for a reply!! I tried Accurax's tip and set up my own formmailer I've made my own php page and uploaded the formmailer and all tht but when I try to test it , I get a warning "Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for XXX@XXX.COM in \\his ip address\a directory\another directory\some more directories\mail.php on line 9" where XXX@XXX.com is my email ID What do I do?? Last edited by Accurax; May 11th, 2007 at 07:50. Reason: removed IP address and directory structure |
![]() |
| Tags |
| form, help, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hiding / Showing form fields based on previous form input | John Alexander Hopper | PHP Forum | 1 | Mar 10th, 2008 11:30 |
| form variable within an iframe component of a form | kissfreaque | PHP Forum | 3 | Feb 29th, 2008 13:06 |
| form variable within an iframe component of a form | kissfreaque | JavaScript Forum | 5 | Feb 29th, 2008 11:57 |
| [SOLVED] PHP contact form redirect to same form | Posie | PHP Forum | 14 | Jan 29th, 2008 20:28 |
| ASP form to check weather a form value is already in the database | Andrew1986 | Classic ASP | 3 | Oct 25th, 2007 08:23 |