Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I don't get it... (PHP) [ UPDATED]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
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

PostPosted: Mon Feb 16, 2009 1:59 pm    Post subject: I don't get it... (PHP) [ UPDATED] Reply with quote

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

Very Happy
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
View user's profile Send private message
deleted user 111213
Grandmaster Cheater
Reputation: 0

Joined: 09 Nov 2007
Posts: 714

PostPosted: Mon Feb 16, 2009 3:27 pm    Post subject: Reply with quote

it would be easier to fix this if you gave us your code.
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Mon Feb 16, 2009 3:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Feb 17, 2009 3:42 am    Post subject: Reply with quote

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
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Tue Feb 17, 2009 4:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Cheat Engine User
Something epic
Ban
Reputation: 60

Joined: 22 Jun 2007
Posts: 2071

PostPosted: Tue Feb 17, 2009 4:13 am    Post subject: Reply with quote

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
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Feb 17, 2009 7:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Boon
Cheater
Reputation: 0

Joined: 13 Jan 2009
Posts: 29
Location: Latvia

PostPosted: Tue Feb 17, 2009 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Feb 17, 2009 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 18, 2009 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Wed Feb 18, 2009 10:43 am    Post subject: Reply with quote

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
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 18, 2009 4:23 pm    Post subject: Reply with quote

Eraser wrote:
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?

Maby they have a MS SQL dbs for windows?
ofc there are. you can for instance save to result to a file.
U can also host the script on another server Razz

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Wed Feb 18, 2009 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites