Print Page | Close Window

Help with poll code

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6766
Printed Date: 03 April 2026 at 8:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Help with poll code
Posted By: uvena.com
Subject: Help with poll code
Date Posted: 27 October 2003 at 6:26pm

Hello, I am trying to write a mod to show the newest poll in a specific forum category / topic, I am wanting to know if the variables are vital to the posting of the forum or not (meaning tpn, pn, rn, etc).

Is there a mod like this out there for 7.5?  Anybody got any ideas on how to manipulate the current include file that shows a form to show only the poll that is most recent (by id) in the specific forum?  I am thinking it is something with my SQL query that is causing the problem.

Thank you so much..




Replies:
Posted By: uvena.com
Date Posted: 27 October 2003 at 6:56pm

As a note, I took the poll include file and changed it around so that SQL query is only looking for a poll, with the forum id set earlier in the code, now my problem is that I am thinking something is wrong because the variables aren't being passed (the hidden variables PN,TPN).  I am thinking these are topic page number and page number.  I can display the poll, when I try to post, it gives me the following error:

Type mismatch: 'CInt'
/apps/siteup/forum/forum_posts.asp, line 224

This tells me it is redirecting from the poll cast vote code.

Which line 224 is is looking for the page number in the query... so I am confused as to why if I copied the code (unless it is in the query and I didnt see it) it isnt setting these hidden variables in the form.



Posted By: uvena.com
Date Posted: 27 October 2003 at 7:04pm
Another update.  I put the variables for the forum page number and topic id into the form hard coded, which worked, although it did not update the poll with any new values as it should.  So I am thinkin there is one more variable that wasn't passed, which is the page number.  Is the page number something that has to be sent or is there another variable that must be in the form or querystring for the update to the database to happen?


Posted By: uvena.com
Date Posted: 27 October 2003 at 9:54pm

Well no replies yet but a few reads.  What it amounted to was the fact that 1) the user must be logged in to vote if this has been set for the poll and 2) the correct forum id must be used depending on the poll.  So I have a forum named polls, i sort the sql query and choose the newest poll entered by id, and that about wraps it up.

So if anybody wants to put the newest poll on yer page, set a variable in the code that tells the sql what forum id you are looking at (FID of the forum), have the SQL find the most recent file by id, and include it in the page with common.asp as an include file for your connection.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net