وقتی شما نمیتونید با یه اسکریپت کار کنید دلیل نمیشه اسکریپت خرابه
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="poll/css/demo.css" />
<link rel="stylesheet" href="poll/css/poll.css" />
<title>سیستم نظر سنجی</title>
</head>
<body>
<h1>سیستم نظر سنجی</h1>
<div id="container">
<?php
error_reporting(E_ALL);
include('poll/include/config.php');
include('poll/include/database.php');
include('poll/poll.class.php');
$class = new Poll;
$poll = $class->ShowPoll(1);
$poll2 = $class->ShowPoll(2);
echo $poll.'<br />'.$poll2;
/*
$lastq = mysql_query("SELECT * FROM `poll_questions` ORDER BY id DESC LIMIT 0 , 30");
while($row = mysql_fetch_array($lastq)){
$poll = $class->ShowPoll($row[0]);
echo $poll . "<br>";
}
*/
?>
</body>
</html>
این کد ها تو index موجوده
این کد استاتیک هست و دو تا نظر سنجی با این آی دی ها نشون میده (1 و 2)
بجای اون کد اینا قرار بدین
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="poll/css/demo.css" />
<link rel="stylesheet" href="poll/css/poll.css" />
<title>سیستم نظر سنجی</title>
</head>
<body>
<h1>سیستم نظر سنجی</h1>
<div id="container">
<?php
error_reporting(E_ALL);
include('poll/include/config.php');
include('poll/include/database.php');
include('poll/poll.class.php');
$class = new Poll;
$lastq = mysql_query("SELECT * FROM `poll_questions` ORDER BY id DESC LIMIT 0 , 30");
while($row = mysql_fetch_array($lastq)){
$poll = $class->ShowPoll($row[0]);
echo $poll . "<br>";
}
?>
</body>
</html>
بنده خودم جدای از ترحمه یه کد پویا نوشتم اما بصورت کامنت قرار دادم هر کی خواست برش داره براش کار کنه
در ضمن آدرس سایتتون را هم قرار بدین
موفق باشید