If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll: Going to wrong page upon vote  XML
Forum Index » Support Forum
Author Message
middleeastfacts
Beginner

Joined: 19/08/2004 17:30:32
Messages: 26
Offline

I have Advanced Poll set up on my site, inside my left menu, which appears on every page. The poll appears fine on http://www.middleeastfacts.com/index1.php (which is a test page, not my main page), and the left menu is an included file called left1.php.

If you make a selection and click vote, for some reason the user is redirected to http://www.middleeastfacts.com/left1.php and not index1.php. Does anybody know why? When I tested it in another location, it worked fine, but for some reason now it doesn't work.

Any ideas?

Thanks,
Steve
[WWW]
Anonymous



Yes
Becouse you are using frames and in that case $HTTP_SERVER_VARS['PHP_SELF'] is left.php not index.php

You must change it in class_poll.php, or much better don't use frames.
Anonymous



I forgot to sign
middleeastfacts
Beginner

Joined: 19/08/2004 17:30:32
Messages: 26
Offline

kodif wrote:I forgot to sign


Hi Kodif,
Thanks for your comments. My site doesn't have frames - the left menu is an include, but I'm sure the same problem exists.

Can you tell me exactly how to change class_poll.php? I'm not too familiar with php. I guess the problem is that the left menu or left.php is on every page of my site, so this poll will show on every page. Thus, if somebody uses the poll, the results have to show on that page - it won't always be index.php. Is there a command other than PHP_SELF that I can use?

Anyway, the most confusing thing to me is that here the code works fine, even though I've implemented it the same. Confusing...

Thanks for your assistance,
Steve
[WWW]
middleeastfacts
Beginner

Joined: 19/08/2004 17:30:32
Messages: 26
Offline

I did identify one difference between my actual page and my test page. On my test page, have I have my includes in the same directory - so left.php is in the same directory as index.php. In my actual page, I have my includes in a separate directory, /template/ so that I can find them more easily. So, for some reason, advanced poll is looking for left.php (actually, left1.php because I'm testing it) in the root rather than the tempate directory.

Anybody know how to fix this or do I just have to move left.php into the root?

Steve
[WWW]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum