Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting Form Data in XHTML without E-mail or ASP.

Status
Not open for further replies.

sergeantroach

Programmer
Nov 14, 2004
2
GB
Hi there.

Just a quickie for a newbie web developer.
(I'm a software engineer and hardware geek at heart)

I want to send information collected through Optgroups and Radio buttons to a file on my hard disk, or to a webpage on a web server, without using E-mail, or ASP.

Here's the source code I've written so far, ignore anything in comments, I may have written a few silly things. :)

Thanks in advance for any help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="
<body bgcolor="#000000" text="#FFFFFF">
<font face="Tahoma" size="-1">

<p>Which Operating System are you using?</p>

<form action="Non XHTML Examples/Data.html" method="get">
<!--<form method="post" action="mailto:example@hotmail.com">-->
<center><select>
<optgroup label="Microsoft Windows">
<option value ="PS">Windows - Please Select your version</option>
<optgroup label="Microsoft Embedded Operating Systems">
<option value ="Win 2k3">XP Embedded</option>
<option value ="Win 2k3">CE Embedded</option>
<optgroup label="Microsoft Windows 2003 Server">
<option value ="Win 2k3">2003 Sever - 64 bit</option>
<option value ="Win 2k3">2003 Server Standard Edition</option>
<option value ="Win 2k3">2003 Server Enterprise Edition</option>
<option value ="Win 2k3">2003 Server Datacenter</option>
<option value ="Win 2k3">2003 Server Web Edition</option>
<optgroup label="Microsoft Windows XP">
<option value ="Win XP 64 bit">XP 64 bit</option>
<option value ="Win XP SP2">XP with SP2</option>
<option value ="Win XP SP1">XP with SP1</option>
<option value ="Win XP">XP with NO Service Packs</option>
<optgroup label="Microsoft Windows 2000">
<option value ="Win 2k SP5">2000 with SP5</option>
<option value ="Win 2k SP4">2000 with SP4</option>
<option value ="Win 2k SP3">2000 with SP3</option>
<option value ="Win 2k SP2">2000 with SP2</option>
<option value ="Win 2k SP1">2000 with SP1</option>
<option value ="Win 2k">2000 with NO Service Packs</option>
<optgroup label="Microsoft Windows NT">
<option value ="Win NTAll">NT with ALL Service Packs</option>
<option value ="Win NTSome">NT with SOME Service Packs</option>
<option value ="Win NTNone">NT with NO Service Packs</option>
<optgroup label="Microsoft Windows Millenium Edition">
<option value ="Win Me">Millenium Edition</option>
<optgroup label="Microsoft Windows 98">
<option value ="Win 98SE">98 Second Edition</option>
<option value ="Win 98">98</option>
<optgroup label="Microsoft Windows 95">
<option value ="Win 95<">95 or below</option>
</optgroup>
<select></select>
<select>
<optgroup label="Mac">
<option value ="PS">Mac OS - Please Select your version</option>
<option value ="X">X</option>
</optgroup>
</select>
<select>
<optgroup label="Linux">
<option value ="PS">Linux - Please Select your version</option>
<optgroup label="Fedora Core">
<option value ="FDC2">3</option>
<option value ="FDC2">2</option>
<option value ="FDC1">1</option>
</optgroup>
<optgroup label="RedHat Linux">
<option value ="RH9">9</option>
<option value ="RH8">8</option>
<option value ="RH<">7.3 or below</option>
</optgroup>
<optgroup label="SuSE Linux">
<option value ="Su9.2">9.2</option>
<option value ="Su9.1">9.1</option>
<option value ="Su9">9</option>
<option value ="Su8.2">8.2</option>
<option value ="Su8.1">8.1</option>
<option value ="Su<">8 or below</option>
</optgroup>
<optgroup label="Mandrake Linux">
<option value ="MDK10">Mandrake Linux 10</option>
<option value ="MDK9.2">Mandrake Linux 9.2</option>
<option value ="MDK9.1">Mandrake Linux 9.1</option>
<option value ="MDK9">Mandrake Linux 9</option>
<option value ="MDK<">Mandrake Linux 8.2 or below</option>
</optgroup>
</select>
</center>

<center><p>Which Web Browser are you using?</p>
<form name="input" action="">
<input type="radio" name="browser" id="IE6" />
<label for="IE6">Internet Explorer 6</label>

<form name="input" action="">
<input type="radio" name="browser" id="<IE6" />
<label for="IE <6">Internet Explorer below version 6</label>

<form name="input" action="">
<input type="radio" name="browser" id="Mozilla Firefox" />
<label for="Mozilla Firefox">Mozilla Firefox</label>

<form name="input" action="">
<input type="radio" name="browser" id="Mozilla" />
<label for="Mozilla">Mozilla</label>

<form name="input" action="">
<input type="radio" name="browser" id="Netscape" />
<label for="Netscape">Netscape</label>

<form action="" name="input" id="input">
<input type="radio" name="browser" id="Other" />
<label for="Other">Other</label>

<p>To Submit your answers via E-mail, click here. <input type="submit"> </input></p>
<!--<p>To Submit your answers via the web to an ASP webpage on a server, click here. <button type="submit"> Submit</button> </p>-->
<button type="submit"> Submit</button>
</form>

</font>
</body>
</html>
 
I want to send information ... without using E-mail, or ASP
You're going to have to either use email (not a good choice), or some kind of server-side language (ASP,PHP,Perl,etc... ) to pick up the information from your form.

If you aren't able to run server-side languages, you could try one of the remotely hosted services listed at
-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
You can also use a FrontPage server extension.

Create yourself a guestbook and use the above form information for it ... FrontPage will then proceed to bloat your markup, adding lines of useless garbage, but it'll write to the specified location.

E I said FrontPage ... *sigh*.

Anyways ...

Greg Tammi, IT Design & Consultation
Work: Home:
 
Hey,

As I despise FrontPage, I'll invest in an ASP.Net book, I've been meaning to learn it for awhile now anyway.

Meantime, does anyone have any ASP links on picking up data?

Thanks for the help guys.
 
Hey ...

As you can tell, I despise FrontPage also. :p

Using ASP, you can retrieve your information very simply - I prefer to have the form POST the data, as using the GET method has data limitations ...

Anyhow, simple example.

---- page name: form.asp ----

<form name="myForm" action="processForm.asp" method="post">
<p>Which operating system?</p>
<select name="os">
<option value="windows">Windows</option>
<option value="linux">Linux</option>
</select>
<input type="submit" name="submit" value="submit" />
</form>

---- page name: process.asp ----

<%
dim selectedOS
' now, to retrieve variables from the posting form, you
' simply type in request.form(""), and fill in the name
' of the form field you wish to retrieve in between the
' quotation marks. If you were using the GET method on
' the form in the previous listed page, you would use
' request.querystring("") instead of request.form("")

selectedOS = request.form("os")

' for now, we'll just write out the selected value
response.write(selectedOS)
%>

And that's all there really is to it ... here's some links for you though, like you asked:


:) pick and choose from that list ... I prefer aspfree.com and aspin.com ... there's interesting stuff there from time to time, and some good tutorials also.

If you need anything else, feel free to ask me.

HTH

Greg Tammi, IT Design & Consultation
Work: Home:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top