Help with php poll
well i got the poll from proxy2.de
im using webspace provided by f2s which i know supports php.
i uploaded all the files into a folder called poll. i chmoded everything correctly but everytime i try to view the admin login i get error 403 permission denied. it says i dont have access to this section.
any ideas why this is happening?
in the read.txt it said to chmod the directory 777 which i did. i've tried other ones as well and nothing is working. any thoughts?
*edit* nevermind i found the problem. they included a htacces file which denied everybody. no clue why it was in there and why they didnt tell me about it.
That is all
My Homepage
mjames posted this at 22:32 — 29th August 2001.
They have: 2,064 posts
Joined: Dec 1999
Okay, then, glad you fixed your problem.
Welcome to TWF, hope you stick around.
whitty posted this at 00:36 — 30th August 2001.
They have: 9 posts
Joined: Aug 2001
hey thanks. i will be sticking around here, its a very active forum with lots of smart people. lol
actually though im having another problem.
if you check out the site
http://www.blueballprodutions.f2s.com/index.php you'll see the poll but it wont let you vote
everything works fine untill one person votes and then it dosent give the option to vote anymore
it says "sorry you can only vote once" to everybody. even if they havent voted
any ideas on whats causing it to do this?
That is all
My Homepage
Mark Hensler posted this at 05:09 — 30th August 2001.
He has: 4,048 posts
Joined: Aug 2000
link does't work for me
whitty posted this at 05:59 — 30th August 2001.
They have: 9 posts
Joined: Aug 2001
(i typed the link wrong, my bad)
lol sorry to do this to you guys again but i figured it out.
again im reaall sorry. i just couldnt figure it out but i kept working on it and finally got it.
as you can tell im new to server side stuff but im getting it.
i do have a question though
im going to use cookies so people cant vote more then once
here's the cookie
<?php
$cookie_expire = 1; // hours
if (!isset($action)) {
$action='';
}
if ($action==\"vote\" && isset($vote_for)) {
$cookie_name = \"AdvancedPoll\".$poll_id;
if(!isset($$cookie_name)) {
setcookie($cookie_name, \"1\", time()+(3600*$cookie_expire));
}
}
?>
i want to make it so it never expires. i know i have to use either "0" or "null"
but im not sure how to change this part so it reflects the above 0
<?php
setcookie($cookie_name, \"1\", time()+(3600*$cookie_expire));]
?>
That is all
My Homepage
Mark Hensler posted this at 15:44 — 30th August 2001.
He has: 4,048 posts
Joined: Aug 2000
Did you figure it out?
I'm not sure if you can set a cookie to live forever. I've always set the cookie for 1 year, and reset the cookie on each visit.
Mark Hensler
If there is no answer on Google, then there is no question.
whitty posted this at 17:16 — 30th August 2001.
They have: 9 posts
Joined: Aug 2001
i havent figured it out myself this time lol
i thought by setting the value of a cookie to 0 or null that it would never expire? i could be wrong but i read it somewhere
basically i have a poll on my site that will be changed every couple weeks or so. i only want people to be allowed to vote once for that poll so i was just going to set the cookie to never expire. i could just set it to expire in a year, or a month or somthing but im not sure how to do that?
do i change the 1 to however many hours and the 3600 to however many seconds?
That is all
My Homepage
Mark Hensler posted this at 22:15 — 30th August 2001.
He has: 4,048 posts
Joined: Aug 2000
3600 is the number of seconds in 1 hour.
What I normally do is this
setcookie($cookie_name, $cookie_value, time()+(60*60*24*$days_expire));
Make $days_expire the number of days that you want to set the cookie to.
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.