lisa33 Posted August 30, 2006 Share Posted August 30, 2006 Hey guys im very new to php and Im working on a website that would need to look like this. I threw this together in Dreamweaver to give you an idea. I need it to be a voting site where there is a check box under each pic where an individual would view all pictures then at the end choose one and click vote having a box appear with the total. Now I dont mind if the person votes more then once however I only want their last vote to count. Now could this be done using php? And if so can anyone point me in the right direction. Thank you so much!! Lisa P.s. I apologize but when you view the sample the pictures dont appear but you can still see what I am trying to aim for![attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/ Share on other sites More sharing options...
ronverdonk Posted August 30, 2006 Share Posted August 30, 2006 If this user is known to you, as in 'has logged-in', you can keep the voting count in the database with the user's data. If any site vitisor can vote, then all you can do is collect as much data as you can gather, such as referer (not always set), ip address (not always trustworthy), browser data, etc. and store that in the database. And use that to compare with each new vote.Ronald 8) Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83162 Share on other sites More sharing options...
lisa33 Posted August 30, 2006 Author Share Posted August 30, 2006 [quote author=ronverdonk link=topic=106319.msg425036#msg425036 date=1156975733]If this user is known to you, as in 'has logged-in', you can keep the voting count in the database with the user's data. If any site vitisor can vote, then all you can do is collect as much data as you can gather, such as referer (not always set), ip address (not always trustworthy), browser data, etc. and store that in the database. And use that to compare with each new vote.Ronald 8)[/quote]Hey Ronald, Thanks for the quick reply...but Im sorry I didnt really understand....The only people who can vote are those who are logged in. This is going to be a members paid site. I would like everything to be done automatically if that is possible...So would this be done using php? Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83166 Share on other sites More sharing options...
ronverdonk Posted August 30, 2006 Share Posted August 30, 2006 Yes. Assuming that you have your user data in the database, you can use that for keeping track of his/her voting using PHP and your database (MySql?) query language.When the user votes, you check his db data to see if he/she has voted already:[code]SELECT user_name FROM user_table WHERE user_name='uid' and vote_for_president = 1[/code]If that query returns positive: you can send the user a message: "You have already voted".If the query returns negative, you can store his vote in the database user data, e.g.:[code]UPDATE user_table SET vote_for_president=1 WHERE user_name='uid' [/code] Then send a message "Your vote has been registered".The above is not exhaustive, just a sample of how you could accomplish this.Ronald 8) Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83172 Share on other sites More sharing options...
lisa33 Posted August 31, 2006 Author Share Posted August 31, 2006 Can dreamweaver perform something like this or do I need php? Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83259 Share on other sites More sharing options...
zq29 Posted August 31, 2006 Share Posted August 31, 2006 You'll need PHP - Dreamweaver is just a WYSIWYG HTML editor as far as I'm aware, it offers no advanced automatic script creation. Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83293 Share on other sites More sharing options...
.josh Posted August 31, 2006 Share Posted August 31, 2006 actually, dreamweaver (at least, version 8 does) has php syntax highlighting as well as a few basic code completion buttons. But PHP is certainly not the main focus of dreamweaver. I'm not sure if you can even link the php interpreter to it to test a script in it's internal browser or not. I would definately not recommend it for php scripting. But that's just me. Some people swear by it. Though, some people also swear by plain old notepad too...but regardless, there aren't any editing programs out there that will automatically make this script for you. You are going to have to either find a premade script or else make one yourself. Or hire someone to do it for you. moving this thread to misc section. if you have a specific question about a piece of code, feel free to start a new thread about it. Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83302 Share on other sites More sharing options...
steelmanronald06 Posted August 31, 2006 Share Posted August 31, 2006 I hear word that adobe bought dreamweaver, but if you need a good IDE, choose PHP Designer Pro. As per your question. Yes this is all done in PHP, and it is extremely basic. Go over to phpfreaks.com main site, and click on tutorials. There you will find a fully fleshed Member System and I do believe a tutorial on how to set up a poll/vote. Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83422 Share on other sites More sharing options...
obsidian Posted August 31, 2006 Share Posted August 31, 2006 [quote author=steelmanronald06 link=topic=106319.msg425316#msg425316 date=1157027635]I hear word that adobe bought dreamweaver, but if you need a good IDE, choose PHP Designer Pro.[/quote]yes, adobe bought out macromedia a while back.... and so far, it's been only good come of it. dreamweaver 8 is by far the best implementation of the system to date, and it does have a great number of resources to help users out more than its predicessors. Quote Link to comment https://forums.phpfreaks.com/topic/19211-is-this-done-with-php/#findComment-83423 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.