| Author | 
					Message | 
				
				 
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 03/03/2003 22:11:04
	  
	
	
 						 | 
					
					
						
						
Anonymous
 
  
 
 						 | 
		
						
						
							
									When I've added the following text to my page? then what?
  It just displays the script text.
  Not the poll. Or should i save the index file in php????
  
  Thanks
  
  
  <?php 
  /* Include this before your html code */
  include "./poll_cookie.php"; 
  ?>
  
  --------------------------------------------------------------------------------
  <?php
  
  /* path */ 
  $poll_path = "/home/joshi/public_html/db";
  
  require $poll_path."/include/config.inc.php";
  require $poll_path."/include/$POLLDB[class]";
  require $poll_path."/include/class_poll.php";
  $CLASS["db"] = new polldb_sql;
  $CLASS["db"]->connect(); 
  
  $php_poll = new poll();
  
  /* the first poll */ 
  echo $php_poll->poll_process(1);
  
  
  /* the second poll */
  $php_poll->set_template_set("simple");
  $php_poll->set_max_bar_length(80); 
  echo $php_poll->poll_process(2);
  
  
  /* the third poll */
  $php_poll->set_template_set("popup");
  if ($php_poll->is_valid_poll_id(3)) {
      echo $php_poll->display_poll(3);
  } 
  
  ?>
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 06/03/2003 08:53:19
	  
	
	
 						 | 
					
					
						
						
Anonymous
 
  
 
 						 | 
		
						
						
							
									Same issue here
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 07/03/2003 21:41:43
	  
	
	
 						 | 
					
					
						
						
micky2k2
 
	Newbie
	 
  
	Joined: 05/12/2002 06:32:52 
	Messages: 2
 
	Location: Newcastle upon Tyne, UK
	 
		Offline 
 						 | 
		
						
						
							
									You do need to change the extension from .html to .php if you are using php in the page.
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 11/03/2003 12:27:38
	  
	
	
 						 | 
					
					
						
						
Ulrich
 
	Beginner
	 
  
	Joined: 11/03/2003 12:13:33 
	Messages: 6
 
		Offline 
 						 | 
		
						
						
							
									Mine doesn't work either. I've enabled PHP. Two questions:
  
  1. In
  
  <?php 
  /* Include this before your html code */ 
  include "./poll_cookie.php"; 
  ?> 
  
  do you substitute the relative path to poll_cookie.php for "./poll_cookie.php"?
  
  2. The script text seems to be set up for the db version. What do you use for the textfile version? I've looked and can't find anything in the files I downloaded.
  
  Thanks!
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 11/03/2003 12:36:18
	  
	
	
 						 | 
					
					
						
						
Anonymous
 
  
 
 						 | 
		
						
						
							
									
			
				Ulrich wrote:Mine doesn't work either. I've enabled PHP. Two questions:
  
  1. In
  
  <?php 
  /* Include this before your html code */ 
  include "./poll_cookie.php"; 
  ?> 
  
  do you substitute the relative path to poll_cookie.php for "./poll_cookie.php"?
  
  2. The script text seems to be set up for the db version. What do you use for the textfile version? I've looked and can't find anything in the files I downloaded.
  
  Thanks! 
		 
  
  1. use the full path 
  You can get it from the admin
  
  2. It doesn't matter what you use 
  textfile and db use the same config
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 11/03/2003 18:49:45
	  
	
	
 						 | 
					
					
						
						
Ulrich
 
	Beginner
	 
  
	Joined: 11/03/2003 12:13:33 
	Messages: 6
 
		Offline 
 						 | 
		
						
						
							
									Thanks for the response!
  
  It's still not working. I put:
  
  <?php
  include "/www/hm/j/jkalb/poll/poll_cookie.php";
  ?>
  
  in before all html coding, and stuck
  
  <?php
  /* path */
  $poll_path = "/www/hm/j/jkalb/poll";
  require $poll_path."/include/config.inc.php";
  require $poll_path."/include/$POLLDB[class]";
  require $poll_path."/include/class_poll.php";
  $CLASS["db"] = new polldb_sql;
  $CLASS["db"]->connect();
  $php_poll = new poll();
  /* the first poll */
  echo $php_poll->poll_process(1);
  /* the second poll */
  $php_poll->set_template_set("simple");
  $php_poll->set_max_bar_length(80);
  echo $php_poll->poll_process(2);
  /* the third poll */
  $php_poll->set_template_set("popup");
  if ($php_poll->is_valid_poll_id(3)) {
   echo $php_poll->display_poll(3);
  }
  ?>
  
  in the body of the page that is to include the poll. The page has the *.php suffix. Then when I go to the page in my browser it stops loading at the point where the second code snippet appears.
  
  Any ideas?
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 12/03/2003 02:49:21
	  
	
	
 						 | 
					
					
						
						
Ulrich
 
	Beginner
	 
  
	Joined: 11/03/2003 12:13:33 
	Messages: 6
 
		Offline 
 						 | 
		
						
						
							
									Got it working! Found the code to insert on the page in another post.
  
  Don't understand though why the distribution doesn't include an explanation of what to put on the page to make the poll show up.
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 13/03/2003 00:04:24
	  
	
	
 						 | 
					
					
						
						
Anonymous
 
  
 
 						 | 
		
						
						
							
									This script looks good but unfortunately there is absolutely no information on how to setup it up correctly on your page....
  
  
			Got it working! Found the code to insert on the page in another post. 
   
		 
  
  
  Can you share what you found out? Or post a link to it please?
  
  -tag
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 13/03/2003 00:28:36
	  
	
	
 						 | 
					
					
						
						
Ulrich
 
	Beginner
	 
  
	Joined: 11/03/2003 12:13:33 
	Messages: 6
 
		Offline 
 						 | 
		
						
						
							
									Go to:
  
  http://www.proxy2.de/forum/viewtopic.php?t=1668
							
							
						 | 
					
		
					 
						| 
						 | 
					
	
					
						
	
				
		![[Post New]](/forum/templates/html/images/icon_minipost_new.gif) 02/06/2003 00:54:28
	  
	
	
 						 | 
					
					
						
						
keepone
 
	Newbie
	 
  
	Joined: 02/06/2003 00:44:40 
	Messages: 1
 
		Offline 
 						 | 
		
						
						
							
									sorry but the topics doesn't work.
  
  so what can i do to show the poll ?
  Does it need a php extension ?
  
  thanks
							
							
						 | 
					
		
					 
						| 
						 | 
					
				
		
				
					| 
						
					 |