Calling my script-knowing friends

Svenskaflicka

Fountain
Joined
Jun 9, 2002
Posts
16,142
My website is almost done - well, part of it is, anyway. Now, I need some help. On one page, I want to have a poll where people can make a guess on who's gonna be The Chosen One in the coming HP-book. I can set up a form with alternatives and add a submit-button, but I need a script that will make it so that when a visitor votes and pushes the submit-button, the chosen alternative will be counted and a new page will show up with the results of all the votes - kinda like we have here.
I've looked around a little, but all I've found was Unix/Linux-scripts and a lousy one that Angelfire offered, where they had a limit on how many letters the question and/or the alternative answers could be. Needless to say, I need to be able to write a longer alternative answer than just "Someone who..."!!!

I know there are lot of script-knowing people here. Can one of you advice me on where to find a suitable script?
Thank you!
 
Last edited:
I work with HTML. I haven't learned PSP nor ASP yet.:eek: That will be my next course.

Well, basically, I have this one page where I ask a question, and people can choose from 5 different answers. They check the box and hit submit, just like we do here at Lit.

BUT, my education just taught me how to create such a poll, not how to write a script that will register the vote and open a new window with the results.

I'm including a screenprint of the page, so you'll know what I'm talking about.
 
Well to actually store your result, you need some kind of script and database handler. Question is, what script languages does your server support?
 
Svenskaflicka said:
You tell me. I went with B-one, which you recommended.

It all depends on what your server actually supports. Did you get a database with your hosting package? If so, is it in PHP, ASP, something else?

Who are you hosters? Or is that B-one? Never heard of that!

Lou
 
Svenskaflicka said:
B-one.net.

I think they have both PHP and ASP and even ASAP...;)

Yep, cool, you also have a MySQL database, very similar package to mine.

Here's a link to a very good site, where I get a lot of PHP scripts from: PHP Resource Index It's worth going there and seeing if they have anything you want.

Here's a good page, with some scripts for polls: Poll Scripts

The thing you need to do is set it all up in your database, so that the data can be collated, returned, etc. You also need to set the target page for the "Thanks for using my poll" back to the page the poll is on, or the index page, or wherever you want the visitor to be redirected back to.

Each script, whereever you get it from, should include details as to how you need to set it up in the database.

Lou
 
Thank you, Lou. I've managed to log in to something called MySQL, but I have no idea what to do with it. My education didn't cover scripts and PHP/ASP/MySQL.

I need very simple instructions, like "copy and paste between < A > and < B >.
 
Go HERE, as this looks like quite a good one.

You have to download the zip, then follow the install instructions. It is pretty straightforward. All the info you need is there.

Good luck! ;)

Lou :rose:
 
BEEEEEEEEEEEP!!!

OK, I only managed to get to the "Download Here"-part, and then I run into trouble. There are two of them! What's the difference?:confused:
 
Svenskaflicka said:
BEEEEEEEEEEEP!!!

OK, I only managed to get to the "Download Here"-part, and then I run into trouble. There are two of them! What's the difference?:confused:

They are just from different sources. Download the first one.

Once you've downloaded it extract the folder from the zip, then go into the folder and find the "Installation" instructions. I think the actual info you need is in the "docs" folder, within the main folder.
 
Stupid question no 2:

"Upload all files to your server" - as they are, or do I need to create folders with the same names as in Docu and sort the files into them?
 
Svenskaflicka said:
Stupid question no 2:

"Upload all files to your server" - as they are, or do I need to create folders with the same names as in Docu and sort the files into them?
Depends on your FTP program. Most can upload a whole directory structure, so that should be ok. I assume that the unzippd files were in a directory structure already.
 
Yes, they were. And Dreamweaver usually handles such things very well. I'll give it a try...
 
OK, I've uploaded all the files and their directories through FTP. I've edited the script and saved it as "index2.php".

Now, how do I insert it into the poll-page?
 
Svenskaflicka said:
OK, I've uploaded all the files and their directories through FTP. I've edited the script and saved it as "index2.php".

Now, how do I insert it into the poll-page?
b-one suppost server side includes. Try this: <!--#include file="index2.php"-->

I'm not 100% sure it works ok with php though.
 
...and this goes...where?

Inbetween the HEAD-tags? The BODY-tags?

I'll experiment a little.
 
Svenskaflicka said:
...and this goes...where?

Inbetween the HEAD-tags? The BODY-tags?

I'll experiment a little.
Depends on what the file contains.
 
Back
Top