Mystic Software Forums

Miscellaneous => General Off-Topic => Topic started by: DarkElite on April 04, 2004, 04:54:07 PM

Title: (no subject)
Post by: DarkElite on April 04, 2004, 04:54:07 PM
Hey, just wondering if there is a way for me to create my own poll without having the register somewhere (but if there is a way to get a poll with registering and without paying, tell me please!) ?
Title: (no subject)
Post by: Spyder on April 04, 2004, 05:14:56 PM
I'm afraid I don't know what you mean. Do you mean your own forum?
Title: (no subject)
Post by: Anonymous on April 04, 2004, 06:28:43 PM
...

To make a poll you'll need to know some sort of front or back end scripting language. PHP is all the rage these days but VB guys like myself prefer ASP. Then there's your fronties like VBS, FS, JS. These are probably a good place to start because you can eaisly integrate them into your site without a fancy smancy host. Take a peak:

<INPUT TYPE="BUTTON" VALUE="Click me!" NAME="Command1">
<script LANGUAGE="VBS">
 MsgBox "Click the darn button!"
 Sub Command1_OnClick
  MsgBox "That's a good little boy/girl."
  document.bgcolor="black"
 End Sub
</SCRIPT>

Now obviously a poll's a bit more work. My favorite scripting language would be VBS but few browsers support it. Try a search on google for more info.
Title: (no subject)
Post by: DarkElite on April 06, 2004, 01:04:07 PM
am i able to just write a js program that will just tally votes with something like:

Code: [Select]
if (vote=yes)
{
yes=yes+1
}

if (vote=no)
{
no=no+1
}

and then just display the votes?
Title: (no subject)
Post by: Dude Man on April 06, 2004, 04:48:38 PM
Aren't you trying to make a Poll in HTML? That looks like RPGCode.
Title: (no subject)
Post by: DarkElite on April 06, 2004, 04:49:29 PM
javascript can do that
Title: (no subject)
Post by: Anonymous on April 06, 2004, 06:01:25 PM
Quote from: "DarkElite"
am i able to just write a js program that will just tally votes with something like:

Code: [Select]
if (vote=yes)
{
yes=yes+1
}

if (vote=no)
{
no=no+1
}

and then just display the votes?

That wouldn't save the variables. You have to write the data to a file (a database would work nicest).

Of course JS can do it, all the fronties are pretty much the same, I just prefer VBS.
Title: (no subject)
Post by: DarkElite on April 06, 2004, 06:02:58 PM
i hate to ask this....but how would i write it in VBS? (i usually try to do it on my own...)
would you be able to make a simpler version of a tallying program for me?
Title: (no subject)
Post by: Anonymous on April 07, 2004, 08:53:13 PM
I don't actually know too much about MySQL (a database system). What you might want to do is search for a tutorial in your language of choice and read it. The acutal displaying is easy but writing to a database is slightly harder.
Title: (no subject)
Post by: Raging Gogeta on April 08, 2004, 06:38:30 PM
Okay, you want a FREE Poll-Generator, right? Check out <a href='http://www.alxnet.com' target='_blank'>http://www.alxnet.com</a>. It can generate Polls, Message Boards, Quizzes, and a Guestbook.
Title: (no subject)
Post by: Anonymous on April 08, 2004, 11:08:25 PM
Quote from: "Raging Gogeta"
Okay, you want a FREE Poll-Generator, right? Check out <a href='http://www.alxnet.com' target='_blank'>http://www.alxnet.com</a>. It can generate Polls, Message Boards, Quizzes, and a Guestbook.

I believe he wanted to, as the topic is called, "My my own poll".
Title: (no subject)
Post by: Dude Man on April 08, 2004, 11:17:57 PM
Dark Eilte, makeing any progress?
Title: (no subject)
Post by: DarkElite on April 09, 2004, 09:44:46 AM
yup!  Laughing , but ive opnly been able to display it, its on my site right now, but i just cant get it to work...

(also i havent added the newer version of the site, so its not quite what it looks like right now)
Title: (no subject)
Post by: DarkElite on April 09, 2004, 05:37:27 PM
wow!! its actually realy easy to write a polling script!!  Surprised

for anyone who knows PHP, youre able to set variables in the web adress by just doing something like:
Code: [Select]
http://darkforces.mysticsoftware.net/poll.php?vote=$value or something of that sort?

also, how would you make a cookie set a value that wouldnt allow someone to vote twice? and also be able to check for that cookie?

this is sooo cool!!!!  B)
Title: (no subject)
Post by: DarkElite on April 09, 2004, 05:51:01 PM
heres an idea for the start of the poll talleying

Code: [Select]
<html>
<body>

<?php

if (isset($_COOKIE["DFpoll"]))
echo "You have already voted for " . $_COOKIE["DFpoll"] . " in this poll!<br />";
else
setcookie("DFpoll", $vote);

?>

</body>
</html>

do you think itll work?
Title: (no subject)
Post by: Xorlak on April 10, 2004, 09:57:28 AM
Quote from: "DarkElite"
Hey, just wondering if there is a way for me to create my own poll without having the register somewhere (but if there is a way to get a poll with registering and without paying, tell me please!) ?

You can find several example poll scripts at <a href='http://www.scriptz.com/' target='_blank'>http://www.scriptz.com/</a>.  Some you have to pay for, but there are several free ones as well.

Quote
for anyone who knows PHP, youre able to set variables in the web adress by just doing something like:
Code: [Select]
http://darkforces.mysticsoftware.net/poll.php?vote=$value
or something of that sort?


You can do that, but it has to be a value, i.e.
Code: [Select]
http://darkforces.mysticsoftware.net/poll.php?vote=3
So in order to get that to work with a variable in your webpage (through a link or submit button, etc.) you need to do something like:

Code: [Select]
http://darkforces.mysticsoftware.net/poll.php?vote=<?php echo "$value" ?>
Title: (no subject)
Post by: DarkElite on April 10, 2004, 10:04:07 AM
so that would make $vote = $value? cool!

what about the cookie making?
Title: (no subject)
Post by: Dude Man on April 10, 2004, 05:24:22 PM
Yum!! Cookie makeing! Razz
Title: (no subject)
Post by: DarkElite on April 10, 2004, 05:26:34 PM
you're kidding right? (i hope you do know what a cookie is...)

but yeah...
Title: (no subject)
Post by: Dude Man on April 10, 2004, 05:36:22 PM
Yeah I was makeing a joke! A cookie is one of them things that you get when you visit a site thing....or something to that effect...
Title: (no subject)
Post by: Colin on April 11, 2004, 01:23:51 PM
A cookie is only resident on your hard-drive. You need to write the data to a file or database on your server.
Title: (no subject)
Post by: Dude Man on April 11, 2004, 01:26:22 PM
Oh yeah.... :rolleyes: