Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 10-27-2005, 08:31 AM   #1
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Even more help - sending user options

My inadequacy at making websites is shown again
I'm trying to make a order form, so the users can select what they want with check boxes buttons, and I want the submit button to send what choices they have made to a certain email address. I have managed to insert the check boxes, submit and reset buttons. But I cannot make it send the information, can anyone help

many many thanks in advance
__________________

__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Old 10-27-2005, 09:16 AM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 7,999
Default Re: Even more help - sending user options

just a quick request...
when you are asking for help like this it's useful to include the server setup...
Now I remember from another post that you have an ASP account...

to send email using asp you use the object cdonts...

unforunatly your sever host doesn't support sending emails,

http://www.1asphost.com/faqs.asp?q=74

sorry.
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 10-27-2005, 09:27 AM   #3
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Re: Even more help - sending user options

wow- thats a good bit of sleuthing, in case no-one else knows, my server is www.1asphost.com.

Is there any other ways I can get the information selected by the user to me
__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Old 10-27-2005, 09:36 AM   #4
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 7,999
Default Re: Even more help - sending user options

you can use a mail to link...
in which case it'd open up a mail client on their computer (not ideal).

or you can store the information in a database on your site and check it periodically, (not ideal if you don't get much traffic)...

or you could swap to a host that does allow use of mail servers.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 10-27-2005, 09:39 AM   #5
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Re: Even more help - sending user options

that was quick, I choose the second option, I need to use that host, for .asp support, and some other stuff I've installed on it

Could anyone tell me how to store the information on a database?

Thanks root, I bet you get annoyed with loads of n00b questions, but I am hopeless at doing websites, but I get £100 for this one, so I couldn't turn it down
__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Old 10-27-2005, 09:44 AM   #6
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 7,999
Default Re: Even more help - sending user options

I could give you a code sample...

but it'd probably be more useful for you to follow the instructions at your host to set this up..
http://www.1asphost.com/Databases.asp
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 10-27-2005, 10:06 AM   #7
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Re: Even more help - sending user options

Sorry, I'm an absolute n00b when building sites, could you give me some code, and I'm useless at doing databases, so some help would be useful there as well.
__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Old 10-27-2005, 11:47 AM   #8
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 7,999
Default Re: Even more help - sending user options

of course... this example is a simple webform to take demographics. What number of males/females like your site...

use this form.
form.html
Code:
<html>
<body>
<form action=submit.asp method=get>
Name : <input type="text" name="name" /><br/>
gender : <input type="radio" name="gender" value="male" />Male, <input type="radio" name="gender" value="female" />Female<br/>
good site? :<input type="checkbox" name="site" value="good" /><br />
<input type="submit" value="submit results" />
</form>
</body>
</html>
when the user submits this page saves it.

submit.asp
Code:
<%
dim Conn, RS
dim name, gender, site

name = request.querystring("name")
gender = request.querystring("gender")
site = request.querystring("site")

DSNStatement = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="
DSNStatement = DSNStatement & Server.MapPath("/USERNAME/database/mydatabase.mdb")
Conn.Open DSNStatement


RS.AddNew "Name", Name  'Make a new record and set the first field
RS.Update    'Update it to make sure it is the current record
RS.Fields("gender").Value = gender   'Set the other fields
PS.Fields("site").Value = site
RS.Update    'Save the changes by calling update again 

RS.Close
Conn.Close 

%>Your details have been saved.

after yuo have a few users you can view your result with this page...
view.asp
Code:
<%
dim Conn, RS
dim name, gender, site

name = request.querystring("name")
gender = request.querystring("gender")
site = request.querystring("site")

DSNStatement = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="
DSNStatement = DSNStatement & Server.MapPath("/USERNAME/database/mydatabase.mdb")
Conn.Open DSNStatement

SQLStatement = "SELECT * FROM questionnaire "
RS.Open SQLStatement, Conn, 3, 3

reponse.write("<table><tr><th>name</th><th>gender</th><th>likes site?</th></tr>")

Do While Not rsInfo.EOF
response.write("<tr>")
          'do something with the current record.
	  respnose.write("<td>")
          Response.Write(rsInfo("name"))
	  respnose.write("</td>")
	  respnose.write("<td>")
          Response.Write(rsInfo("gender"))
	  respnose.write("</td>")
	  respnose.write("<td>")
          Response.Write(rsInfo("site"))
	  respnose.write("</td>")
          rsInfo.MoveNext
response.write("</tr>")
       Loop
response.write("</table>>")

RS.Close
Conn.Close 

%>

I've not tested it, and it's all from the top of my head... I had a quick look at how your host does things for stuff like the database path...

I'm sure in my mind something is wrong with it... (It's been ages since I used ASP, since then I've been using ASPX with SQL databases, and of course the mighty mighty PHP!!!).
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 10-27-2005, 12:19 PM   #9
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Re: Even more help - sending user options

wow, thats great I love you root (in a non-homosexual manner, obviously)

I shall report on my findings
__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Old 10-27-2005, 12:57 PM   #10
Daemon Poster
 
Techy Geek's Avatar
 
Join Date: Feb 2005
Posts: 1,320
Send a message via MSN to Techy Geek
Default Re: Even more help - sending user options

it sorta works, well, look for yourself....http://g.1asphost.com/rhphoto/form.html, the male button doesn't work, do I need to make a database, because I've never understood those properly, if so, would you mind awfully making it yourself and email it to me. But its great so far.
I would give you loads of rep points, but it won't let me

Sorry to double post
__________________

__________________
"If I seem to act unkind, its only me and not my mind" I Want To Tell You, The Beatles, Revolver
"When I am king, you will be first against the wall" Paranoid Android, Radiohead, OK Computer
There are two types of people, those who hate Microsoft, and those who work for it...
Possibly a Mac Convert
Techy Geek is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 11:52 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0