Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ไม่ยอมแสดงข้อมูล ช่วยตอบกระทู้หน่อยนะค่ะ คือว่าตามหน้าเว็บที่ปรากฏนะค่ะ



 

ไม่ยอมแสดงข้อมูล ช่วยตอบกระทู้หน่อยนะค่ะ คือว่าตามหน้าเว็บที่ปรากฏนะค่ะ

 



Topic : 034599



โพสกระทู้ ( 71 )
บทความ ( 0 )



สถานะออฟไลน์




ช่วยตอบกระทู้หน่อยนะค่ะ คือว่าตามหน้าเว็บที่ปรากฏนะค่ะ เวลาทำการค้นหาแล้วไม่ยอมแสดงข้อมูล เนี่ยคือรูปหน้าจอของหนู

page


------------------------------------------------------------------------------------------------------------------------------
ส่วนนี้โค้ดค่ะ ถ้ามีการแก้ไขตรงไหนก็รบกวนดูให้หน่อยนะค่ะ

ขอบคุณค่ะ

Code (PHP)
<?php
	//session_start();
	include("connect.php");

		function cutstring($str, $len) { 
				if (strlen($str)<=$len) return $str; 

				else return sprintf("%.".$len."s..", $str); 

				} 
	$i_institute = mysql_query("select * from department  order by DepartID;");  //หน่วยงาน
    $Maj = mysql_query("select * from Major  order by ID;");  //สาขาผลงาน

	
	
	$pro= mysql_query("select * from major  where ID ORDER BY ID ASC");
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($dbname, $conn);
$query_rsDepart =("select * from department  order by DepartID ") ;
$rsDepart = mysql_query($query_rsDepart, $conn) or die(mysql_error());
$row_rsDepart = mysql_fetch_assoc($rsDepart);
$totalRows_rsDepart = mysql_num_rows($rsDepart);

mysql_select_db($dbname, $conn);
$query_rsMajor =("select * from major  order by ID ") ;
$rsMajor = mysql_query($query_rsMajor, $conn) or die(mysql_error());
$row_rsMajor = mysql_fetch_assoc($rsMajor);
$totalRows_rsMajor = mysql_num_rows($rsMajor);


mysql_select_db($dbname, $conn);
$query_rsfile =("select * from filex order by ID ") ;
$rsfile = mysql_query($query_rsfile, $conn) or die(mysql_error());
$row_rsfile = mysql_fetch_assoc($rsfile);
$totalRows_rsfile = mysql_num_rows($rsfile);

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>ระบบสืบค้นข้อมูลผลงานเด่น</title>
<style type="text/css">
<!--
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>

<body>
        <form id="Checkform" name="Checkform" method="post" onSubmit="return check()" action="result_search.php">

<table width="212" height="187" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="12"><img src="image/barlogin_01.jpg" width="12" height="12"></td>
    <td width="184"><img src="image/barlogin_02.jpg" width="188" height="12"></td>
    <td width="15"><img src="image/barlogin_03.jpg" width="15" height="12"></td>
  </tr>
  <tr>
    <td><img src="image/barlogin_04.jpg" width="12" height="185"></td>
    <td><table width="188" height="145" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="image/home.gif" width="20" height="20"> <a href="index.php"><strong>หน้าหลัก</strong></a> </td>
      </tr>
      <tr>
        <td height="22"><u>ค้นหา</u></td>
      </tr>
<form id="Checkform" name="Checkform" method="post" onSubmit="return check()" action="result_search.php">
      <tr>
        <td>คำค้น:
          <label>
              <input name="Name" type="text" id="Name">
            </label></td>
      </tr>
      <tr>
        <td>
          <label>
            ค้นหาจาก: 
            										<select name="DepartID" id="DepartID">
                                                        <option selected="selected" value="">กรุณาเลือกหน่วยงาน</option>
												        <?php while(	$arrs3=mysql_fetch_array($i_institute)){ ?>
        										      <option value="<?=$arrs3[DepartID]; ?>" 
													<?php if($_SESSION["i_institute"] == $arrs3[DepartID] )echo "selected"; ?>> 
													      <?php
														  	$return3=cutstring($arrs3[DepName],25); 
														  echo $return3;?></option>
          										    <?php } ?>
            </select>
            </label>        </td>
      </tr>
      <tr>
        <td>สาขาผลงาน : </td>
      </tr>
      <tr>
        <td><select name="major" id="text">
          <option selected="selected" value="">กรุณาเลือกสาขาผลงาน</option>
          <?php while(	$arrs4=mysql_fetch_array($Maj)){ ?>
          <option value="<?=$arrs4[ID]; ?>" 
													<?php if($_SESSION["Maj"] == $arrs4[ID] )echo "selected"; ?>>
            <?php
														  	$return4=cutstring($arrs4[Mname],25); 
														  echo $return4;?>
            </option>
          <?php } ?>
        </select></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center">
      
        
          <input type="submit" type="button" onClick="NewWindow"name="Submit" value="ค้นหา">
           <input name="Reset" type="button" value="ยกเลิก"  id="button" onclick="window.location.href='index.php';" />
        </div></td>
      </tr>
    </table></td>
    </form>
    <td><img src="image/barlogin_06.jpg" width="15" height="185"></td>
  </tr>
  <tr>
    <td><img src="image/barlogin_07.jpg" width="12" height="15"></td>
    <td><img src="image/barlogin_08.jpg" width="188" height="15"></td>
    <td><img src="image/barlogin_09.jpg" width="15" height="15"></td>
  </tr>
</table>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="image/barlogin_01.jpg" width="12" height="12"></td>
    <td><img src="image/barlogin_02.jpg" width="188" height="12"></td>
    <td><img src="image/barlogin_03.jpg" width="15" height="12"></td>
  </tr>
  <tr>
    <td><img src="image/barlogin_04.jpg" width="12" height="810"></td>
    <td valign="top"><table width="184" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><img src="image/icon.gif" width="10" height="10"> <strong>หมวดหมู่</strong></td>
      </tr>
	  <tr>
        <td>&nbsp;</td>
      </tr>
	    <?php 
 			if(mysql_num_rows($pro)!= 0)
 			{ 
 				for($i = 0;$i < mysql_num_rows($pro);$i++)
				{
		?>
	    <tr>
		  <td> <img src="image/arrow-23.gif" width="17" height="9"> <a href='data_all.php?search=1&&ID=<?php echo mysql_result($pro,$i,"ID"); ?>' onMouseover=highlight(this,'#C0C0C0') onMouseout="highlight(this,'')"><?php echo mysql_result($pro,$i,"Mname"); ?></a></td>
	    </tr>
	  
	   <?php } 
						} 
					else 
					{?>
      <tr>
        <td>ไม่พบข้อมูล</td>
      </tr>
	  
	    <?php } ?>
    </table></td>
    <td><img src="image/barlogin_06.jpg" width="15" height="810"></td>
  </tr>
  <tr>
    <td><img src="image/barlogin_07.jpg" width="12" height="15"></td>
    <td><img src="image/barlogin_08.jpg" width="188" height="15"></td>
    <td><img src="image/barlogin_09.jpg" width="15" height="15"></td>
  </tr>
</table>
</body>
</html>
<?php


mysql_free_result($rsDepart);

mysql_free_result($rsMajor);
?>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-11-19 11:14:38 By : kabton_hok View : 5828 Reply : 0
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ไม่ยอมแสดงข้อมูล ช่วยตอบกระทู้หน่อยนะค่ะ คือว่าตามหน้าเว็บที่ปรากฏนะค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่