<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "PHP question - admin_edit.php in Advanced Poll program"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "PHP question - admin_edit.php in Advanced Poll program"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>PHP question - admin_edit.php in Advanced Poll program</title>
				<description><![CDATA[ It looked like poll_extend() does something similar to what I'm wanting to do.  There may be better choices, but what I'm trying to do is create a table with three colunns.  The table will conain a list of all active polls where a member has yet to vote.<br />  Column  ----   Contains<br />    1  -----   poll title($question), <br />    2  -----   link for the primary member to display the poll,<br />    3  -----   link for the secondary member (typically a spouse) to display the poll<br /> <br /> I saw things in poll_extend that I didn't follow, and thought seeing "who" called it might clarify things. One of the things I didn't understand was the call to create_javascript_array().  Anyway, at first I thought it was called in is_valid_poll_id() which, soon brought up additional conufusion.<br /> There may be a better example of how to display the table with the links, but would like to know if the code in is_valid_poll() below line 183 ever executes.<br /> <br /> This is most likely a php question - I thought I was starting to understand php, and how the php engine works, until I saw the code in is_valid_poll_id().  <br /> I have the latest vesion of Advanced Poll, and wonder if the code after line 183 could ever be executed.<br /> Line 184 is: "if (!isset($poll_id) || !is_valid_poll_id($poll_id)) {"<br /> I included a snippet of lines 174 thru 188 in the php file -poll_extend() was called in line 205.<br /> Is this an error, or can it actually be executed?<br /> <br /> Any help would be appreciated.<br /> Michael<br /> <br /> [code]function is_valid_poll_id&#40;$poll_id&#41; &#123;<br />     global $CLASS, $POLLTBL;<br />     if &#40;$poll_id&gt;0&#41; &#123;<br />         $CLASS&#91;&quot;db&quot;&#93;-&gt;fetch_array&#40;$CLASS&#91;&quot;db&quot;&#93;-&gt;query&#40;&quot;SELECT poll_id FROM $POLLTBL&#91;poll_index&#93; WHERE poll_id=$poll_id&quot;&#41;&#41;;<br />         return &#40;$CLASS&#91;&quot;db&quot;&#93;-&gt;record&#91;'poll_id'&#93;&#41; ? true &#58; false;<br />     &#125; else &#123;<br />         return false;<br />     &#125;<br /> &#125;<br /> <br /> if &#40;!isset&#40;$poll_id&#41; || !is_valid_poll_id&#40;$poll_id&#41;&#41; &#123;<br />     $redirect = &quot;index.php?session=$auth&#91;session&#93;&amp;uid=$auth&#91;uid&#93;&quot;;<br />     header &#40;&quot;Location&#58; $redirect&quot;&#41;;<br />     exit&#40;&#41;;<br /> &#125;[/code]]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5431/19819.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5431/19819.php</link>
				<pubDate><![CDATA[Tue, 7 Mar 2006 01:25:56]]> GMT</pubDate>
				<author><![CDATA[ Michael_C]]></author>
			</item>
	</channel>
</rss>