Voting Poll
Collapse
X
-
dont you think to add anti spam vote??
per user can vote once ??Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
-
Originally posted by subzero View Postdont you think to add anti spam vote??
per user can vote once ??
yeah i agree..
Comment
-
how can it be once per user? I think they should be registeqed users for that to work. Because, how can the script if me is me again? Or, do you know any IMEI-reader script?mysterio.al - programming is a functional art
Comment
-
Code:CREATE TABLE `vote` ( `id` varchar(20) NOT NULL default '', `good` varchar(200) NOT NULL default '', `bad` varchar(200) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
PHP Code:if($_GET[a] == "vote")
{
$ip=$_SERVER['REMOTE_ADDR'];
$good = mysql_fetch_array(mysql_query("SELECT COUNT(good) FROM vote WHERE good"));
echo "GOOD: $good[0]<br/>";
$bad = mysql_fetch_array(mysql_query("SELECT COUNT(bad) FROM vote WHERE bad"));
echo "BAD: $bad[0]";
echo "
<form method=\"post\" action=\"?a=voteadd\">
<div>
<select name=\"vote\">
<option value=\"good\" selected=\"selected\">GOOD</option>
<option value=\"bad\">BAD</option>
</select>
</div>
<div><input type=\"hidden\" name=\"id\" value=\"$ip\"/></div>
<div><input type=\"submit\" value=\"VOTE!\"/></div>
</form></div>";
}
if($_GET[a] == "voteadd")
{
$ip=$_SERVER['REMOTE_ADDR'];
$ip = mysql_fetch_array(mysql_query("SELECT id FROM vote WHERE id='$_POST[id]' "));
if($ip[0] == "$_POST[id]")
{
echo "<div style=\"text-align:center\"> You had voted before !!</div>";
echo "<div style=\"text-align:center\"><a href=\"?\">HOME</a></div>";
}
echo "<div style=\"text-align:center\">THANK YOU!!</div>";
if($_POST[vote] == "good")
{
$good = mysql_fetch_array(mysql_query("SELECT good FROM vote "));
$vo = $good[0] + 1;
$query=mysql_query("insert into vote(id,good) values('$_POST[id]','$vo')");
}
if($_POST[vote] == "bad")
{
$bad = mysql_fetch_array(mysql_query("SELECT bad FROM vote "));
$vo = $bad[0] + 1;
$query=mysql_query("insert into vote(id,bad) values('$_POST[id]','$vo')");
}
}
also add a timer like 1 or 2 hours to update id to 0 again so users can vote later...Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
You can see mine you can mod it to rec there ip and delete later in hour or so
You coding is done good but with anti spam vote its good ideaVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
Originally posted by subzero View PostCode:CREATE TABLE `vote` ( `id` varchar(20) NOT NULL default '', `good` varchar(200) NOT NULL default '', `bad` varchar(200) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
PHP Code:if($_GET[a] == "vote")
{
$ip=$_SERVER['REMOTE_ADDR'];
$good = mysql_fetch_array(mysql_query("SELECT COUNT(good) FROM vote WHERE good"));
echo "GOOD: $good[0]<br/>";
$bad = mysql_fetch_array(mysql_query("SELECT COUNT(bad) FROM vote WHERE bad"));
echo "BAD: $bad[0]";
echo "
<form method=\"post\" action=\"?a=voteadd\">
<div>
<select name=\"vote\">
<option value=\"good\" selected=\"selected\">GOOD</option>
<option value=\"bad\">BAD</option>
</select>
</div>
<div><input type=\"hidden\" name=\"id\" value=\"$ip\"/></div>
<div><input type=\"submit\" value=\"VOTE!\"/></div>
</form></div>";
}
if($_GET[a] == "voteadd")
{
$ip=$_SERVER['REMOTE_ADDR'];
$ip = mysql_fetch_array(mysql_query("SELECT id FROM vote WHERE id='$_POST[id]' "));
if($ip[0] == "$_POST[id]")
{
echo "<div style=\"text-align:center\"> You had voted before !!</div>";
echo "<div style=\"text-align:center\"><a href=\"?\">HOME</a></div>";
}
echo "<div style=\"text-align:center\">THANK YOU!!</div>";
if($_POST[vote] == "good")
{
$good = mysql_fetch_array(mysql_query("SELECT good FROM vote "));
$vo = $good[0] + 1;
$query=mysql_query("insert into vote(id,good) values('$_POST[id]','$vo')");
}
if($_POST[vote] == "bad")
{
$bad = mysql_fetch_array(mysql_query("SELECT bad FROM vote "));
$vo = $bad[0] + 1;
$query=mysql_query("insert into vote(id,bad) values('$_POST[id]','$vo')");
}
}
also add a timer like 1 or 2 hours to update id to 0 again so users can vote later...mysterio.al - programming is a functional art
Comment
-
you cant get imei lol not as yet but i think never will happen...
You can add time with ip addy
$ip=$_SERVER['REMOTE_ADDR'];
$newip = str_replace(".","",$ip);
$time = date("h");
echo "$newip$time";
this will show your ip1
so next hour user allow to vote.
also put a notice
Sorry you can vote right now try again in a hour.
Also you can change time to mins like H = hour M = Mins S = sec'sLast edited by subzero; 24.11.09, 09:24.Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
What u say about this http://pakwap.net/t2/poll/form.php with anti spamFree Web Hosting @HostersPoint.com
php Hosting with Web Builder
Buy - Sell ADs
ADMOLA ADs Network
Monetize Your Site Traffic
Comment
-
What you say about this http://pakwap.net/t2/poll/form.php with anti SpamFree Web Hosting @HostersPoint.com
php Hosting with Web Builder
Buy - Sell ADs
ADMOLA ADs Network
Monetize Your Site Traffic
Comment
Comment