PHP form in html website

Hello Experts,

I have a html website and i want to add a web form which can record the Name, E-Mail and Phone number and send validation mail to the person who filled the form. When a person validates e-mail address, should get an auto reply with an attachment.

Can i achieve this in pure HTML site? Do i need to use PHP or are there any alternatives to do this? I have tried online web form builders but they do not fulfill my requirements besides they are costly.

A step by step guide would be very much helpful and would be greatly appreciated. Thanks.

Best Regards
Raghav.
LVL 7
RaghavIT SpecialistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
a web form could be as simple as a HTML file, but seems you going to capture data and send validation emails, your web form need to be posted to a server side scripting page (like .php page), so that the data submitted could be saved into a database, etc and do the relevant actions (like sending validation email) accordingly.

you can check these articles out on how to send out emails in PHP:

Using phpMailer to Send Mail through PHP
http://www.inmotionhosting.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail-through-php

Sending attachments with email
http://www.tutorialspoint.com/php/php_sending_emails.htm
RaghavIT SpecialistAuthor Commented:
Thanks Ryan for your reply.

I will check this out.

Best Regards
Raghav.
Marcus BointonCommented:
Please don't use the script from InMotion. They have based their code on an obsolete example and are using a very old, buggy version of PHPMailer. I've no idea why they chose to host their own copy instead of linking directly to the source. The tutorialspoint example is also very buggy, and a good example why you should not call `mail()` yourself. Get the latest PHPMailer, and you'll find it comes with up-to-date examples.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Loganathan NatarajanLAMP DeveloperCommented:
Here is a  correct  example for phpMailer library.

When you use this library it helps to send html based and avoid spam at the maximum.
Marcus BointonCommented:
No, that's also an ancient, long out of date example. If you want a tutorial, there is an up to date tutorial on Github.
Ray PaseurCommented:
The general design pattern you want is shown in this article.
http://www.experts-exchange.com/articles/3939/Registration-and-Email-Confirmation-in-PHP.html

Please read it over and post back if you still have questions.  If you' re new to PHP, this article might be helpful, too.
http://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
Noted, thanks for highlighting Squinky...
Vimal DMSenior Software EngineerCommented:
HI,

1.Create HTML form controls in a html file
2.Add FORM ACTION to "processform.php" and type to POST
3.In the processform.php get those posted values and store it in Database
RaghavIT SpecialistAuthor Commented:
Hello Experts,

Sorry for the delay in response.

I was traveling and did not get any chance to look at the solutions.

I will read them out and post the results. Thanks a lot.

Best Regards
Raghav.
RaghavIT SpecialistAuthor Commented:
Hi Ray,

Your articles helped me a lot in understanding the concept.

I managed to create a form with simple submission. I will now try to implement verification in to this.

Thanks a lot.  

BTW you had suggested some reading material to someone in your article. May i also get some suggestions?  I am not a pro in PHP but manage to write simple code with learn and try method.

Best Regards
Raghavendra.
Ray PaseurCommented:
There are several learning resources identified in this article:
http://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html

If you like books (I do) check the paragraph about "Learning PHP from Books"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.