Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
02/10/2002 15:15:31
|
Anonymous
|
This question was lost in the server crash....Would somebody please show me how to modify the following basic html file to incorporate a poll in it?
Current file name is TEST.HTM
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
</head>
<body>
</body>
</html>
Following is poll code I am supposed to incorporate in this. I am not sure if I wrap PHP code around HTML or insert PHP code in HTML? Can somebody show me by properly merging these two? Thanks!!!!!
<?php
/* Include this before your html code */
include "./poll_cookie.php";
?>
<?php
/* path */
$poll_path =
"/home/warrenmo/public_html/Poll/textfile";
require $poll_path."/include/config.inc.php";
require $poll_path."/include/class_poll.php";
$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);
}
?>
|
|
02/10/2002 16:51:29
|
Anonymous
|
Three polls on one page inside a table.
To view: www.sitename.com/reunionpoll.php
Filename: reunionpoll.php
contents of file:
<?php
/* Include this before your html code */
include "/home/warrenmo/public_html/Poll/textfile/poll_cookie.php";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 2</title>
<meta name="Microsoft Border" content="none">
</head>
<body>
<?php
/* path */
$poll_path = "/home/warrenmo/public_html/Poll/textfile";
require $poll_path."/include/config.inc.php";
require $poll_path."/include/class_poll.php";
?>
<table border="0" cellpadding="3" cellspacing="3" width="480">
<tr>
<td width="160" align="center" valign="top">
<?php
$php_poll = new poll();
$poll_path = "/home/warrenmo/public_html/Poll/textfile";
echo $php_poll->poll_process(4);
?>
</td>
<td width="160" align="center" valign="top">
<?php
$php_poll = new poll();
$poll_path = "/home/warrenmo/public_html/Poll/textfile";
echo $php_poll->poll_process(6);
?>
</td>
<td width="160" align="center" valign="top">
<?php
$php_poll = new poll();
$poll_path = "/home/warrenmo/public_html/Poll/textfile";
echo $php_poll->poll_process(5);
?>
</td>
</tr>
</table>
</body>
</html>
|
|
02/10/2002 23:13:47
|
Anonymous
|
rename your test page 'TEST.HTM' to TEST.php
|
|
|
|
|
|
Based on the open source JForum
|