We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
How do I set up a form on my website?
welnik
Posts: 541 Forumite
in Techie Stuff
I did a web design course in 1999 and things have moved on somewhat since then.
I cannot find my course notes, but I bet they are of no use now, but I am trying to set up a very simple form for enquiries via my website.
Anyone able to offer any advice on where to start?
cheers
Welnik
I cannot find my course notes, but I bet they are of no use now, but I am trying to set up a very simple form for enquiries via my website.
Anyone able to offer any advice on where to start?
cheers
Welnik
Matched betting proceeds so far: £505.00
0
Comments
-
-
-
0
-
What are you wanting to happen when they hit the submit button on your form?
The form itself is very basic HTML but doing something with the information they submit is a little more tricky - but there are plenty of free examplesAll posts made are simply my own opinions and are neither professional advice nor the opinions of my employers
No Advertising or Links in Signatures by Site Rules - MSE Forum Team 20 -
Astaroth wrote:What are you wanting to happen when they hit the submit button on your form?
The form itself is very basic HTML but doing something with the information they submit is a little more tricky - but there are plenty of free examples
Just something very basic. A general enquiry form.
Your Name:*
Location:*
Email Address:*
Phone Number:*
Message:
Please Complete Required Fields Marked *
Ive made the actual form with boxes to be filled in, but I cannot remember for the life of me what to do next. In 1999 things seemed a bit simpler.Matched betting proceeds so far: £505.000 -
cwoodham wrote:
This one is only free if you allow ads to appear all over your website. Ive actually got the form its just what to do next which Im struggling with.
thanks anywayMatched betting proceeds so far: £505.000 -
0
-
The best bet is to use the PHP scripting language to process your form. Something like this should do the trick, send me email if you need more help.
$email = $HTTP_POST_VARS[email];
$mailto = "email@address";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) !! $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[/email][email])) !! mail($mailto, $mailsubj, $mailbody, $mailhead); }[/email]0 -
If your web host is capable of running CGI scripts then try:
Matt's FormMail - http://www.scriptarchive.com/formmail.htm
or an enhanced version called NMS FormMail - http://nms-cgi.sourceforge.net/scripts.shtml0 -
derek_mcgilvray wrote:The best bet is to use the PHP scripting language to process your form. Something like this should do the trick, send me email if you need more help.
$email = $HTTP_POST_VARS[email];
$mailto = "email@address";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) !! $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[/email][email])) !! mail($mailto, $mailsubj, $mailbody, $mailhead); }[/email]
Super, thanks for that. Do I just embed that into the code of my webpage? Do I then upload it into the relevant bit with my web page hoster? I use purplecloud and on their website it says
The standard PHP installation is version 4.4.2.
If you wish to use PHP5, you will need to either:
Use the extension .php5 for your PHP scripts.
Create a .htaccess file in the directory containing your PHP scripts. The .htaccess file should contain "AddHandler php5-cgi .php"
This is all double dutch to me!Matched betting proceeds so far: £505.000
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 353.8K Banking & Borrowing
- 254.2K Reduce Debt & Boost Income
- 455.2K Spending & Discounts
- 246.9K Work, Benefits & Business
- 603.4K Mortgages, Homes & Bills
- 178.2K Life & Family
- 260.9K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards