# Help with a Form



## Johnny_Ringo (Jun 23, 2004)

I created my own websites on free servers like angelfire and everything else. I recently built me a server and and started a webserver with apache, mysql, and phpadmin on it. I am trying to create a form that will post on the same page when you click on submit. I am needing to know if I need to do this in cgi, php, asp or anything like that. I have never worked with databases and stuff but am very quick visual learner. I have my www.therichmondasylum.com pointing to my webserver and it works just trying to create this form and it will not take. Is it possible to do it in dreamweaver and if so how cause I cannot figure it out. Thank you in advance if you have any suggestions.


----------



## Big-K (Nov 22, 2003)

If your looking to actually learn the scripting languages, i would check out http://www.w3schools.com/


----------



## Johnny_Ringo (Jun 23, 2004)

I asked a friend and he told me how to create a database and make an asp page that pulls it but now every time I go to my page it ask me to download the asp page and it won't display. Does anyone know why?


----------



## bearqst (May 21, 2004)

Would have to see the code you used to know whay you have to download it each time.

However, I'd go with PHPO and mySQL to answer you original question.


----------



## oblivious69 (Jun 11, 2004)

seems to be working. I went to the site, entered something and it showed up in the text area.


----------



## Johnny_Ringo (Jun 23, 2004)

Yes it works now. I had a friend help me and got it all working. Now I am trying to think of a way to created a questionaire that when you choose a question and you answer one way you get directed to a page or if you answer the other way you get directed to another page. I think it would be like an if then statement but I can't figure out how to get the value involved.


----------



## bassetman (Jun 7, 2001)

I have picked up scripts that will do that from here:
http://javascriptsource.com

You just have to play with the values and URLS :up:


----------



## bassetman (Jun 7, 2001)

BTW here is the processing (part of) one that I use


```
function NextLevel () {
if (score > 10) {
alert("Cheater!");
}
if (score >= 7 && score <= 11) {
alert("Access permitted!  But there are no new questions yet! ...")

//change previous line to: self.location="js_misc_userquiz2.html" if you make more
```


----------



## Johnny_Ringo (Jun 23, 2004)

Ok I see that but now how do I get the radio buttons to equal a certain value and get the function to pick it up. So that when they answer a certain number of questions one way it goes to one page and then if they answer another way they go to a different page. It is just trying to get the radio buttons to get a value and pull that value from it.


----------



## bassetman (Jun 7, 2001)

If I understand your question (can you weigh the scores?) and then choose one of TWO? URLs say. Then that is a bit more complicated.

If "X=>Y then (no longer a programming term) http:etc, if X<Y then url= Http: etc

Something along that line.

I'll give an ex. in a min.


----------



## bassetman (Jun 7, 2001)

```
function NextLevel () {
if (score > 10) {
alert("Cheater!");
}
if (score >= 7 && score <= 11) {
alert("Access permitted!  But there are no new questions yet! ...")

//change previous line to: self.location="js_misc_userquiz2.html" if you make more

}
else {
alert("Access denied!  You need 7 points to enter the next level.")
   }
}
// End -->

</SCRIPT>
```


----------



## Johnny_Ringo (Jun 23, 2004)

yes thats right but now how do you get the answers in their with the radio buttons from the question. I am going to have a like 5 questions with 2 answers each and each answer is weighted with a value and I cannot figure out how to tac on the value to the radio button for the equation part at the end.


----------



## bassetman (Jun 7, 2001)

If you PM me your email address pretty fast, I can send you the whole script that you can modify to do what you want I think.

Otherwise I can get it to you tomorrow via same method.


----------



## bassetman (Jun 7, 2001)

Sorry, I just realized I have to go now. 

If you sen it to me I can get it to you later.


----------



## Johnny_Ringo (Jun 23, 2004)

Hey thanx bassetman I got that script to work for my needs and everything else. I appreciate it. Now just got to design the rest of the site before I put it up.


----------



## bassetman (Jun 7, 2001)

:up:


----------

