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 > PHP -- ต้องการเลือก dropdown แล้วรีเฟส แต่ข้อมูลที่เราดึงมาแสดงด้วย ไม่แสดง



 

PHP -- ต้องการเลือก dropdown แล้วรีเฟส แต่ข้อมูลที่เราดึงมาแสดงด้วย ไม่แสดง

 



Topic : 132996



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



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




PHP -- ต้องการเลือก dropdown แล้วรีเฟส แต่ข้อมูลที่เราดึงมาแสดงด้วย ไม่แสดง

หน้าแรกเลือกที่ข้อมูลนักเรียนที่ต้องการ กดปุ่ม Score
1

จะส่งค่าเลขที่นักเรียนที่เลือก
2

แล้วจะเลือกปีกศึกษา แต่ข้อมูลรหัสนักเรียนก็หาย
3


growdata_student.php
<?php
	session_start();
?>

<!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">
<head>

<?php
    /*header('Content-Type: text/html; charset=utf-8');*/
	
	
	/*mysql_connect("localhost","root","12345678");
	mysql_select_db("pookpanya");*/
	include ("config.php");
	$strSQL = "SELECT * FROM member_teacher  WHERE UserID_teacher = '".$_SESSION['UserID_admin']."' ";
	$objQuery = mysql_query($strSQL);
	$objResult = mysql_fetch_array($objQuery);
?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Plookpanya School -- ระบบสารสนเทศนักเรียน</title>

<!-- load stylesheets -->
<link rel="stylesheet" href="css/bootstrap.min.css">    
<!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColHybLtHdr #sidebar1 { padding-top: 30px; }
.twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it may need to avoid several bugs */
</style>
<![endif]--></head>

<body class="twoColHybLtHdr">

<div id="container">
  <div id="header">
    <h1 class="style1"><!-- end #header -->
    </h1>
    
  </div>
  <div id="sidebar1">
    <h3 align="center" class="style9">WELCOME!!</h3>
    <table width="235">
    <tr>
      <td width="185" height="20"><div align="center"><img src="icon/user.png" width="150" height="150" /></div></td>
    </tr>
    <tr>
      <td width="185" height="20"><div align="left"><span class="style5"> &nbsp;User ID : &nbsp;<?php echo $objResult["UserID_teacher"];?></span></div></td>
    </tr>
    <tr>
      <td><div align="left"><span class="style7">&nbsp;Name : &nbsp;<?php echo $objResult["TeacherName"];?></span></div></td>
    </tr>
    <tr>
      <td><div align="left"><span class="style7">&nbsp;Status : &nbsp;<?php echo "คุณครู"?></span></div></td>
    </tr>
    </table>
    <table width="222" height="41">
    <tr>
      <td width="214">
         <p align="center"><a href="logout.php"><img src="icon/btnlogout_2.png" width="150" height="60" 
        onmouseover="this.src='icon/btnlogout_3.png';"
		onmouseout="this.src='icon/btnlogout_2.png';"/></a>
        </p>
	</td>
    </tr>
    </table>
    <br />
    
    <table width="238">
   
    <tr>
    <td width="230">
      <p>      <a href="teacher_page.php"><img src="icon/btnmenu.png" width="200" height="60" onMouseOver="this.src='icon/btnmenu_1.png';"
		onmouseout="this.src='icon/btnmenu.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnreport.png" width="200" height="60" onmouseover="this.src='icon/btnreport_1.png';"
		onmouseout="this.src='icon/btnreport.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnchack.png" width="200" height="60" onmouseover="this.src='icon/btnchack_1.png';"
		onmouseout="this.src='icon/btnchack.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnchack_2.png" width="200" height="60" onmouseover="this.src='icon/btnchack_3.png';"
		onmouseout="this.src='icon/btnchack_2.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnlistname.png" width="200" height="60" onmouseover="this.src='icon/btnlistname_1.png';"
		onmouseout="this.src='icon/btnlistname.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnrate.png" width="200" height="60" onmouseover="this.src='icon/btnrate_1.png';"
		onmouseout="this.src='icon/btnrate.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btngrow.png" width="200" height="60" onmouseover="this.src='icon/btngrow_1.png';"
		onmouseout="this.src='icon/btngrow.png';"/></a>
      <a href="teacher_page.php"><img src="icon/btnresult.png" width="200" height="60" onmouseover="this.src='icon/btnresult_1.png';"
		onmouseout="this.src='icon/btnresult.png';"/></a></td>
    </tr>
        <tr>
    <td width="230">
      <p></td>
    </tr>
        <tr>
    <td width="230">
      <p></td>
    </tr>
    </table>
  <!-- end #sidebar1 --></div>
  <div id="mainContent">
   <p class="style12">ข้อมูลการเจริญเติบโตของนักเรียน</p>
   <hr width=90% size=3 color=#003399><br /><br />
    <form name="form1" method="post" action="student_grow.php">
    <table width="728" align="center">
      <tr>
        <td width="235" align="left"><font size="3"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ข้อมูลปีการศึกษา : </td>
		
		<td width="127">  <select name="lmName1" OnChange="window.location='?item='+this.value;">
			<option value="">  -- กรุณาเลือก --</option>
			<?php
			$strSQL = "SELECT * FROM year ORDER BY year_id DESC";
			$objQuery = mysql_query($strSQL);
			while($objResult = mysql_fetch_array($objQuery))
			{
				if($_GET["item"] == $objResult["year_id"])
				{
					$sel = "selected";
				}
				else
				{
					$sel = "";
				}
			?>
			<option value="<?php echo $objResult["year_id"];?>" <?php echo $sel;?>>ปีการศึกษา <?php echo $objResult["year_BE"];?></option>
			<?php
			}
			?>
		  </select></td>
        
		  <td width="350">
          <a href="add_teacher.php"><a href="add_page.php"></a> 
        
          <!-- ปุ่มย้อนกลับ --></td>
      </tr>
	  </table>
 <br />
 
 
 
 <table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
 
	  <tr>
		  <td width="105" height="34" bgcolor="#2F97FF"><div align="center" >รหัสนักเรียน</div></td>
		  <td width="208" bgcolor="#97CBFF"><div align="center">ชื่อนักเรียน</div></td>
          <td width="167" bgcolor="#2F97FF"><div align="center" >ชื่อเล่น</div></td>
		  <td width="120" bgcolor="#97CBFF"><div align="center" >ชั้นเรียน</div></td>
          <td width="122" bgcolor="#FFFFFF"><div align="center" ></div></td>
	  </tr>
      


		  <?php
		  if($_GET["item"] != "")
		  {
			$strSQL = "select member_student.UserID_student, member_student.sex_student, member_student.name_student, member_student.nickname_student, classroom_student.classroom_id, class_student.abbreviation_class, class_teacher.year_id
			from member_student, class_teacher, class_student, classroom_student
where class_teacher.UserID_teacher = '".$_SESSION['UserID_admin']."' AND 
class_teacher.year_id='".$_GET["item"]."' AND
member_student.year_id=class_teacher.year_id AND
member_student.Class_ID=class_teacher.Class_ID AND
member_student.classroom_id=class_teacher.classroom_id AND
member_student.classroom_id=classroom_student.classroom_id AND
member_student.Class_ID=class_student.Class_ID";
			$objQuery = mysql_query($strSQL);
			$item = $_GET["item"];
					while ($row = mysql_fetch_array($objQuery)){
							echo "<tr><td>". $row['UserID_student'] ."</td>
									<td>". $row['sex_student'] ."". $row['name_student'] ."</td>
									<td>". $row['nickname_student'] ."</td>
									<td>". $row['abbreviation_class'] ."/". $row['classroom_id'] ."</td>
									<td><a href='student_grow.php?UserID_student=$row[0]'><img src='icon/btnscore.png' width='85' height='39' /></a></td></tr>";	
							}
				}
		
				
		  ?>
	  </table>
  <br>
  
</form>




Tag : PHP, MySQL, HTML







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2019-01-26 11:27:22 By : aummyasia View : 757 Reply : 2
 

 

No. 1



โพสกระทู้ ( 9,559 )
บทความ ( 2 )



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


เอา tag php ครอบสิครับ เอาอื่นๆ ครอบมันจะได้เรื่องเหรอ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-01-26 21:51:37 By : Chaidhanan
 


 

No. 2



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

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

Code
$strSQL = "select member_student.UserID_student, member_student.sex_student, member_student.name_student, member_student.nickname_student, classroom_student.classroom_id, class_student.abbreviation_class, class_teacher.year_id from member_student, class_teacher, class_student, classroom_student where class_teacher.UserID_teacher = '".$_SESSION['UserID_admin']."' AND class_teacher.year_id='".$_GET["item"]."' AND member_student.year_id=class_teacher.year_id AND member_student.Class_ID=class_teacher.Class_ID AND member_student.classroom_id=class_teacher.classroom_id AND member_student.classroom_id=classroom_student.classroom_id AND member_student.Class_ID=class_student.Class_ID"; $objQuery = mysql_query($strSQL); echo $strSQL;


ได้ค่าแล้วเอาไป Query ดูครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2019-02-04 16:24:32 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : PHP -- ต้องการเลือก dropdown แล้วรีเฟส แต่ข้อมูลที่เราดึงมาแสดงด้วย ไม่แสดง
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 03
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 อัตราราคา คลิกที่นี่