Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » I need help with a form...,


I need help with a form...,

Reply
  #1 (permalink)  
Old 12-07-03, 04:29 PM
godavis4 godavis4 is offline
New Member
 
Join Date: Dec 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy I need help with a form...,

First of all let me say thanks to all of you who run and maintain these forums as well as all who contribute to these forums. It is, I can already tell, a great service to those like me who don't know where to start!

I am truly a newbie to all of this web coding/programming. I used to do MS-Foxpro programming years ago and have fallen away when it went the way of "object-oriented" programming. Now I wish I'd kept up. Anyway, I'm trying to do something that I think is probably "elementary" yet I need some guidance. Right now I have to put up a simple HTML screen that captures basic information about a visitor in a SINGLE page site. This information needs to be saved, lets say to a text file residing on the web server, (right now it doesn't have to be a database although later it could be a database ?Foxpro? maybe) and then sends the visitor who filled out the form, a predetermined email message as an immediate followup to their filling out the screen form.

Right now I have some HTML code that was given to me. I've attached the sample code below at the bottom of this message. The best I can do is, using "common sense", -- logically modify sections, cutting and pasting logical modifications into this code. I'm not yet an HTML maven. I have this page displaying fine when I preview (of course with the proper embedded images present) but I don't know how to set it up so that when a visitor fills out the screen and clicks the button - all the followup steps described above in the previous paragraph are performed. (saves their info to file and sends them an preset email message)

I'm sorry if I'm stating this to simplistically, but this is the best I know how to describe what I need.

Again, thanks in advance for any help.

--Gary

========================


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Make Money NOW!</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0><!-- ImageReady Slices (formimage-------------2----------------1-4-2k3.psd) --><!-- End ImageReady Slices -->
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=75 src="formimage--2_01.gif"
width=19></TD>
<TD width="100%"
background="formimage--2_02.gif">
<P align=center><FONT face="Book Antiqua" color=#ffffff><B>This Information
is rarely offered so inexpensively, so if you like to take the next step,
then take&nbsp;<BR>a moment and complete the simple form below.
Someone will call you the next business day.</B></FONT>
</P></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width="100%" height="100%">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="100%" bgColor=#ae9356 height="100%">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD width="50%">
<IMG height=324
src="formimage--2_03.gif"
width=401></TD>
<TD width="100%"
background="e1.gif">&nbsp; </TD></TR>
<TR>
<TD vAlign=top height="100%"></TD>
<TD width="50%"></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top>
<TABLE height="100%" cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD
background="formimage--2_04.gif">
<IMG
height=132 src="formimage--2_04.gif"
width=332></TD></TR>
<TR>
<TD width="100%" height="100%">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="332"
border=0>
<TBODY>
<TR>
<TD vAlign=top width="312" bgColor=#ae9356>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD colSpan=3>
<IMG height=6
src="formimage--2_05.gif"
width=312></TD></TR>
<TR>
<TD
background="formimage--2_09.gif"
colSpan=3>
<P style="MARGIN-LEFT: 25px"><B><FONT face=Arial
color=#ffffff size=2>Fill Out Form Below to Take
Action Now. Also View Our Web Presentation
video by Clicking Below.</FONT><FONT face=Verdana
color=#ffffff size=1> </FONT></B><FONT face=Arial
color=#ffffff size=1>You can opt out at any time,
otherwise complete this short form, click below
then check your email box for our link so you can
view the video!</FONT></P></TD></TR>
<TR>
<TD vAlign=center align=middle
background="formimage--2_09.gif"
colSpan=3>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
border=0>
<FORM action=~submit_target~ method=post>
<TBODY>
<TR>
<TD align=right width="50%"><B><FONT
face=Verdana size=1>First Name</FONT></B></TD>
<TD width="50%">
<P style="MARGIN-LEFT: 2px"><INPUT size=14
name=First_Name></P></TD></TR>
<TR>
<TD align=right width="50%"><B><FONT
face=Verdana size=1>Last Name</FONT></B></TD>
<TD width="50%">
<P style="MARGIN-LEFT: 2px"><INPUT size=14
name=Last_Name></P></TD></TR>
<TR>
<TD align=right width="50%"><B><FONT
face=Verdana size=1>Email
Address</FONT></B></TD>
<TD width="50%">
<P style="MARGIN-LEFT: 2px"><INPUT size=14
name=email></P></TD></TR>
<TR>
<TD align=right width="50%"><B><FONT
face=Verdana size=1>Phone</FONT></B></TD>
<TD width="50%">
<P style="MARGIN-LEFT: 2px"><INPUT size=14
name=Evening_Phone></P></TD></TR>
<TR>
<TD align=right width="50%"><B><FONT
face=Verdana size=1>Desired
Income</FONT></B></TD>
<TD width="50%">
<P style="MARGIN-LEFT: 2px"><SELECT size=1
name=Desired_Income> <OPTION selected>Please
Select</OPTION> <OPTION>$500/Monthly</OPTION>
<OPTION>$1000/Monthly</OPTION>
<OPTION>$2000/Monthly</OPTION>
<OPTION>$5,000/Monthly</OPTION>
<OPTION>$15,000/Monthly</OPTION></SELECT></P></TD></TR><INPUT
type=hidden value=~id~ name=uid> <INPUT
type=hidden value=~camp_id~ name=camp> <INPUT
type=hidden value=~success_target~
name=success_url> </TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=3>
<IMG height=3
src="formimage--2_09.gif"
width=312></TD></TR>
<TR>
<TD colSpan=3>
<IMG height=6
src="formimage--2_10.gif"
width=312></TD></TR>
<TR>
<TD>
<IMG height=23
src="formimage--2_11.gif"
width=57></TD>
<TD>
<INPUT type=image height=23 width=202
src="formimage--2_12.gif"
border=0 name=Submit></TD>
<TD>
<IMG height=23
src="formimage--2_13.gif"
width=53></TD></TR>
<TR>
<TD vAlign=top bgColor=#ae9356 colSpan=3
height="100%">
<IMG height=10
src="formimage--2_14.gif"
width=312></TD></TR></TBODY></TABLE></TD></FORM>
<TD
bgColor=#ae9356 width="20"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=16 src="t_16.gif" width=38></TD>
<TD width="100%" background="t_17.gif">
<IMG
height=16 src="t_17.gif" width=497></TD>
<TD><IMG height=16 src="t_18.gif"
width=245></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-09-03, 11:59 AM
Arowana Arowana is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
To the best of my knowledge, HTML will not suffice for what you want. The best way to write the form input to a file (or a database) is a server-side scripting language like perl /cgi or better yet, php. HTML can't do what you want. Sorry. On that note, I don't know enough about perl or php to be able to help, but if you have a Moderator move this post to one of those forums, someone might be able to help. Good luck!

Chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-12-03, 12:28 AM
netace netace is offline
New Member
 
Join Date: Dec 2003
Location: Mesa, AZ
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Form handling

Quote:
Originally Posted by godavis4
... I have to put up a simple HTML screen that captures basic information about a visitor in a SINGLE page site. This information needs to be saved, lets say to a text file residing on the web server, (right now it doesn't have to be a database although later it could be a database ?Foxpro? maybe) and then sends the visitor who filled out the form, a predetermined email message as an immediate followup to their filling out the screen form.

Right now I have some HTML code that was given to me. I've attached the sample code below at the bottom of this message. The best I can do is, using "common sense", -- logically modify sections, cutting and pasting logical modifications into this code. I'm not yet an HTML maven. I have this page displaying fine when I preview (of course with the proper embedded images present) but I don't know how to set it up so that when a visitor fills out the screen and clicks the button - all the followup steps described above in the previous paragraph are performed. (saves their info to file and sends them an preset email message)

I'm sorry if I'm stating this to simplistically, but this is the best I know how to describe what I need.

Again, thanks in advance for any help.

--Gary
Chris is right, HTML doesn't do the job -- it does PART of the job (via the <form> tag), but it's necessary to have perl or PHP or other code on the hosting server to handle the processing of the data.

There is a perl/CGI script called web2mail that can handle the e-mailing of the data to you, but you need a more sophisticated routine to stuff the data in a database. Probably want to use PHP to create an XML-type record to transmit to the server, then have the server-side software stuff the record in a MySQL or POSTGRES database. I suggest you try the PHP and MySQL forums -- they may have some canned routines to do what you need.

You may also find some helpful info at http://builder.com.com (a ZDNET site), http://www.php.net (the PHP source), and http://www.mysql.com (the MySQL source).

Hope these help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lock form fields using checkbox jonathen JavaScript 5 02-04-05 04:35 PM
Checkboxes on form = mailto recipient. Bojon PHP 4 12-21-04 07:07 PM
question on form and submit TxRanger JavaScript 2 11-03-03 12:28 PM
SQL database registration form help vinhkhuong PHP 3 10-10-03 04:49 AM
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 10:54 PM


All times are GMT -5. The time now is 06:47 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.