The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Please help me with a form on my website
alan_dawes_uk
post Oct 8 2006, 06:23 PM
Post #1





Group: Members
Posts: 1
Joined: 8-October 06
Member No.: 370



hi

i am no web design expert or anything so if any of you do decide to help me please explain VERY simply as if you are talking to a three year old or something.

i want to put a very simple form on my web site and have some way of easily retrieving the data.

the form is to only have three fields and they are "name", "e-mail address" and "comments".

when i first planned to put this form on my site i thought it would be quite simple but having had a few problems i decided to check out the html help site and started reading about cgi scripts and having to put code into the head section of the html for my page. well this is all completely out of my depth so i could really use somebodies help.

i have attached a picture as an example of the type of form i would like to have on my website.

thank you
Alan

Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shannonlp
post Oct 9 2006, 12:03 AM
Post #2


Novice
**

Group: Members
Posts: 29
Joined: 30-September 06
Member No.: 296



There are a lot of premade scripts that can help you with forms. The most common methods I have seen either use PHP or CGI to pull the information into a database MySQL is pretty common.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 9 2006, 06:48 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(alan_dawes_uk @ Oct 9 2006, 01:23 AM) *

i want to put a very simple form on my web site and have some way of easily retrieving the data.


See http://htmlhelp.com/faq/html/forms.html#form-howto and maybe the FAQ entry following it.

QUOTE
started reading about cgi scripts and having to put code into the head section of the html for my page.


You'll need a server-side script, but not necessarily cgi-based and not necessarily in the page's HEAD section. It can be a separate script file that the form's ACTION attribute points to.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 9 2006, 09:49 AM
Post #4


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(Christian J @ Oct 9 2006, 08:48 PM) *

QUOTE(alan_dawes_uk @ Oct 9 2006, 01:23 AM) *

i want to put a very simple form on my web site and have some way of easily retrieving the data.


See http://htmlhelp.com/faq/html/forms.html#form-howto and maybe the FAQ entry following it.

QUOTE
started reading about cgi scripts and having to put code into the head section of the html for my page.


You'll need a server-side script, but not necessarily cgi-based and not necessarily in the page's HEAD section. It can be a separate script file that the form's ACTION attribute points to.


Um, how could a server-side script _ever_ be "in the page's HEAD section"?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 9 2006, 11:14 AM
Post #5


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(Brian Chandler @ Oct 9 2006, 04:49 PM) *

Um, how could a server-side script _ever_ be "in the page's HEAD section"?


Anything wrong with this? sad.gif

CODE
<head>
<?php
// insert script here
?>
</head>




User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 9 2006, 11:39 AM
Post #6


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(Christian J @ Oct 10 2006, 01:14 AM) *

QUOTE(Brian Chandler @ Oct 9 2006, 04:49 PM) *

Um, how could a server-side script _ever_ be "in the page's HEAD section"?


Anything wrong with this? sad.gif

CODE
<head>
<?php
// insert script here
?>
</head>



Yes, the php script that is presumably run as the php parser gets to this point resides on the server. The <head> of the html document is something that is sent to the browser, and this does not include the php code (well, except by accident sometimes). Of course, if the "Send a message" page submits the form results to itself (possible, but not obviously particularly convenient in this case), then the php script can be included at the beginning of the php source file for the submitting page, but it's usually going to be neater to put the computation _before_ you send the <head> tag, so you can send http headers if necessary.

Perhaps this is a niggle, but it seems to me the answers to this question have been full of confusion, major and minor, and I can't believe this is the answer the OP needs.

Since sending a bunch of info by email is a standard operation, and since there are lots of situations in which (non-programmer) users can't easily run their own scripts, a 3rd party service seems the obvious answer. Unfortunately, I've never seen any of these that aren't "free", i.e. encumbered with advertising, void of any support at all, and probably ideal for anyone who values their own time at around 5 pennies* an hour. (* of any flavo(u)r)

Another problem is the recent surge in form-spamming, to which I don't know a best simple answer.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 9 2006, 12:38 PM
Post #7


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



QUOTE(Brian Chandler @ Oct 9 2006, 06:39 PM) *

the php script that is presumably run as the php parser gets to this point resides on the server. The <head> of the html document is something that is sent to the browser


Most people would call it HEAD already while writing the HTML document, i.e. before even uploading it to the server.

QUOTE
Since sending a bunch of info by email is a standard operation, and since there are lots of situations in which (non-programmer) users can't easily run their own scripts, a 3rd party service seems the obvious answer. Unfortunately, I've never seen any of these that aren't "free", i.e. encumbered with advertising, void of any support at all, and probably ideal for anyone who values their own time at around 5 pennies* an hour. (* of any flavo(u)r)


Many webhosts offer such preinstalled form-to-email scripts, sometimes even the form's HTML is generated for the user to cut & paste.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:05 PM