| View previous topic :: View next topic |
| Author |
Message |
Eraser Grandmaster Cheater
Reputation: 0
Joined: 23 Jul 2008 Posts: 504 Location: http://www.youtube.com/PCtrainers
|
Posted: Mon Feb 16, 2009 1:59 pm Post subject: I don't get it... (PHP) [ UPDATED] |
|
|
EDIT: i got a new script that do not requires MySQL and it works too! The only problem is it's so damn hard to add more vote options.. Having oly two of them narrows my options... I tried adding one more, and it just shows blank page if i choose it and click vote.. damn hard thing -.- still can't figure out how...
Here's vote:
http://www.thps-mods.com/vv/vote.html
And here's source:
http://www.thps-mods.com/files/sourceVotescript.rar
any tips how not to mess up the script when adding options? lol
Last edited by Eraser on Tue Feb 17, 2009 2:29 pm; edited 1 time in total |
|
| Back to top |
|
 |
deleted user 111213 Grandmaster Cheater
Reputation: 0
Joined: 09 Nov 2007 Posts: 714
|
Posted: Mon Feb 16, 2009 3:27 pm Post subject: |
|
|
| it would be easier to fix this if you gave us your code.
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Feb 16, 2009 3:30 pm Post subject: |
|
|
| ghostrider1337 wrote: | | it would be easier to fix this if you gave us your code. |
If you listened he said that he didnt create the code.
You dont need mysql for it but however it would make everything easier for you.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Tue Feb 17, 2009 3:42 am Post subject: |
|
|
without the source, no one can help you.
I cant tell you whats wrong with the php script without the source, because php is hidden when its loaded in a web page.
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Tue Feb 17, 2009 4:07 am Post subject: |
|
|
http://forums.devnetwork.net/viewtopic.php?f=31&p=520193
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish |
|
| Back to top |
|
 |
Cheat Engine User Something epic
Reputation: 60
Joined: 22 Jun 2007 Posts: 2071
|
Posted: Tue Feb 17, 2009 4:13 am Post subject: |
|
|
| Making something like this takes less than 10 minutes (excluding the creation of the MySQL database/table/user), using MySQL, a html form and some PHP that stores it in a database.
|
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Tue Feb 17, 2009 7:31 am Post subject: |
|
|
| nog_lorp wrote: | | http://forums.devnetwork.net/viewtopic.php?f=31&p=520193 |
nog thats not the source, thats just a link to the page that was already posted.
the source has to be the raw php file, not the html shit thats added before and after <? ?>
|
|
| Back to top |
|
 |
Boon Cheater
Reputation: 0
Joined: 13 Jan 2009 Posts: 29 Location: Latvia
|
Posted: Tue Feb 17, 2009 7:51 am Post subject: |
|
|
My guess is it's using flat files instead of a mysql database and it's got problems locking the db file.
Maybe the problem lies in permissions , try to chmod the db file to 777 .
|
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Tue Feb 17, 2009 6:42 pm Post subject: |
|
|
permissions should be set to 755, not 777, plus 755 should be automatically set when uploading.
from looking at the source, its ment to post the data into the two txt files, plus.txt and neg.txt
obviously no votes go in neg, and yes votes go into plus.
pretty poor coding if you ask me, i dont like it at all.
my advice, create a mysql database with a table, and 2 fields
vote-----answer
vote is auto incrementing, meaning it counts each new vote, answer field holds yes or no as an answer.
when submitting the answer, just create a mysql connection, and insert the $var['vote'] into the answer field.
then select the database table and use SUM to count how many entrys there have been, and select by answer yes to count how many have voted yes, subtract it from total votes to get how many voted no, and then print the results.
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Wed Feb 18, 2009 5:48 am Post subject: |
|
|
| Holland wrote: | | Making something like this takes less than 10 minutes (excluding the creation of the MySQL database/table/user), using MySQL, a html form and some PHP that stores it in a database. |
so what are you saying. You wanna exlude the whole progress but still wanna think that 10 minues is accurious?
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
Eraser Grandmaster Cheater
Reputation: 0
Joined: 23 Jul 2008 Posts: 504 Location: http://www.youtube.com/PCtrainers
|
Posted: Wed Feb 18, 2009 10:43 am Post subject: |
|
|
One more question... i see that i cannot get the MySql database because godaddy doesn not support it on windows hosting plans (only linux ones)
So is there any way not to use mysql and have the vote script?
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
|
| Back to top |
|
 |
SXGuy I post too much
Reputation: 0
Joined: 19 Sep 2006 Posts: 3551
|
Posted: Wed Feb 18, 2009 6:24 pm Post subject: |
|
|
to do it without mysql would be pretty much similar to the original one, you can cast the votes and place them into text files stored on the server.
If you need a free host with mysql and php you should check out agilityhoster.com
|
|
| Back to top |
|
 |
|