|
|
|
ปิด require_once รบกวนท่านผู้รู้ด้วยค่ะ select ข้อมูลมาแสดง แล้วข้อมูลออกมา โดยที่ปิด require_once ไว้ |
|
|
|
|
|
|
|
เอา code มาให้ดูหน่อยครับ
|
|
|
|
|
Date :
2009-11-13 15:50:49 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
//session_start();
include("connect.php");
/*
$search = $_GET['search'];
$limitrow = 20;
if(isset($_GET['page']))
{
$page = $_GET['page'];
}
else
{
$page = 0;
}
$start = $page*$limitrow;
if($search == 1)
{
$type = $_POST['select'];
$search1 = $_POST['search1'];
if(isset($_GET['type']))
{
$type = $_GET['type'];
}
if(isset($_GET['search1']))
{
$search1 = $_GET['search1'];
}
if($type == 1)
{
$pro= mysql_query("select * from tb_upload where uses like '%".$search1."%' ORDER BY id_up DESC LIMIT $start,$limitrow;");
}
else //if($type == 2)
{
$pro= mysql_query("select * from tb_upload where name_file like '%".$search1."%' ORDER BY id_up DESC LIMIT $start,$limitrow;");
}
}
*/
$pro= mysql_query("select * from sciwork where ID='$ID'; ");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="file:///C|/Documents%20and%20Settings/JUREEPORN/Desktop/bobie3/search/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body { background-color: #FFFFFF }
body,td,th {
font-size: 12px;
font-family: tahoma;
}
.style18 {color: #000000; font-family: Tahoma; font-size: 12px; }
.style21 {color: #FFFFFF}
.style1 {color: #FF0000;
font-weight: bold;
}
.style13 {font-size: 12px; color: #FFFFFF; font-family: tahoma; }
.style8 { font-size: 12px;
color: #000000;
font-family: tahoma;
}
.style9 { font-family: tahoma;
font-size: 12px;
}
-->
</style>
</head>
<body topmargin="0" >
<form action="" method="post" name="form1" enctype="multipart/form-data">
<div align="center">
<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<th scope="col"> <?php require_once('../search/top.php');?></th>
</tr>
<tr>
<td>
<table width="100%" border="1" cellspacing="0" cellpadding="3">
<tr>
<th width="165" height="392" valign="top" scope="col">
<?php
require_once('../search/menu.php');
?></th>
<th scope="col" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="3" align="left" valign="bottom"><div align="left"><strong>
</strong>
<strong> </strong>
<input name="search1" type="text" id="search1" size="15" checked>
<select name="select">
<option value="1" <?php if($type == null || $type == 1)echo "selected"; ?>>ค้นหาโดยชื่อผลงาน</option>
<option value="2" <?php if($type == 2)echo "selected"; ?>>ค้นหาโดยชื่อหน่วยงาน</option>
</select>
<input name="Submit" type="submit" onClick="document.form1.action='industry.php?search=1';document.form1.submit();" value="ค้นหา">
</div></td>
</tr>
<tr >
<td width="97" align="left" valign="bottom"> </td>
<td width="274" valign="top"> </td>
<td width="219"><div align="right"></div></td>
</tr>
<tr>
<td colspan="3">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#FFFFFF">
<tr bgcolor="#23a5e3">
<td width="10%" align="center" ><span class="style21">ลำดับ</span></td>
<td width="77%" align="center" ><span class="style21">ชื่อผลงาน</span></td>
</tr>
<?php
if(mysql_num_rows($pro)!= 0)
{
for($i = 0;$i < mysql_num_rows($pro);$i++)
{
?>
<tr bgcolor="#F0FAFF" >
<td align="center" ><span class=""><?php echo $i+1; ?></span></td>
<td align="left"> <a href='detail.php?ID=<?php echo mysql_result($pro,$i,"ID"); ?>'><?php echo mysql_result($pro,$i,"wName"); ?></a>
<?php echo mysql_result ($pro,$i,"ID"); ?></td>
</tr>
<?php }
}
else
{?>
<tr bgcolor="#F0FAFF" >
<td align="center"><div align="center" class="style9">
<p>ไม่พบข้อมูล</p>
</div> </td>
<td align="center"> </td>
</tr>
<?php } ?>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p></th>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center">
<?php require_once('../search/under.php');?>
</div>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
code เนี่ยไม่ได้ปิด require_once นะค่ะ
|
|
|
|
|
Date :
2009-11-13 16:07:17 |
By :
kabton_hok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php require_once('../search/under.php');?>
ลองเปลี่ยนเป็น
Code (PHP)
<?php include('../search/under.php');?>
ดูนะครับ
|
|
|
|
|
Date :
2009-11-13 16:54:41 |
By :
pokultra |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันก็ยัง error อยู่อ่ะค่ะพี่
Warning: mysql_result() [function.mysql-result]: wName not found in MySQL result index 7 in C:\AppServ\www\search\data_all.php on line 132
|
|
|
|
|
Date :
2009-11-13 16:57:52 |
By :
kabton_hok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|