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,028

HOME > PHP > PHP Forum > ขอความกรุณาผู้รู้ช่วยดู code ให้หน่อยค่ะ



 

ขอความกรุณาผู้รู้ช่วยดู code ให้หน่อยค่ะ

 



Topic : 026025



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



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




<body>
<?
include("config.inc.php");
$sql="SELECT replace(idstudent,'$m','<b>$m</b>'),s.idstudent,s.idtitlename, s.fristname, s.lastname, m.namefaculty, f.namefield, s.address, s.tel FROM tb_student AS s, tb_filed AS f, tb_faculty AS m, tb_titlename AS t WHERE s.idfield = f.idfield AND f.idfaculty = m.idfaculty AND s.idtitlename = t.idtitlename and idstudent = '$idstudent' ";
//echo $sql;
$r=mysql_query($sql);
?>
<? while($f=mysql_fetch_array($r)){
$idtitlename =$f['idtitlename'];
$fristname =$f['fristname'];
$lastname =$f['lastname'];
$namefield =$f['namefield'];
$address1 =$f['address'];
$tel1 =$f['tel'];
?>
<? } ?>
<?
include("config.inc.php");
$sql="SELECT s.idestablishment,s.nameestablishment,s.address,s.tel,p.nameprovince,s.email FROM $tb_establishment AS s,$tb_province AS p WHERE s.idprovince = p.idprovince and nameestablishment Like '%$nameestablishment%' ";
//echo $sql;
$a=mysql_query($sql);
?>

<? while($d=mysql_fetch_array($a)){
$nameestablishment=$d['nameestablishment'];
$address=$d['address'];
$tel=$d['tel'];
$nameprovince = $d['nameprovince'];
$email = $d['email'];
?>
<? }?>
</p>
<form action=""method="post" name="form1" id="form1">
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#00CC99" class="style63"><div align="center" class="style72">ข้อมูลการฝึกงาน</div></td>
</tr>
</table>
<table width="96%" height="467" align="center" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
<tr>
<td width="22%" height="30" class="style62"><div align="right" class="style68">ปีการศึกษา :</div></td>
<td width="3%" class="style57">&nbsp;</td>
<td width="75%" class="style57"><span class="style24">
<label></label>
</span>
<label></label>
<span class="style24">
<label></label>
</span><span class="style24">
<label></label>
</span>
<input name="academicyear" type="text" id="academicyear" size="10" /> </td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">รหัสนักศึกษา :</div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<label></label>
<span class="style24">
<label></label>
</span><span class="style24">
<label></label>
</span>
<div align="left">
<span class="style69">
<input name="idstudent2" type="text" value="<? echo $_GET['idstudent']?>" />
</span>
<input name="CONTENT" type="button" class="txtcontent" value="ค้นหา" onClick="window.location.href ='selectstudent.php'"/>
</div></td>
</tr>
<tr>
<td height="26" class="style62"><div align="right" class="style68">คำนำหน้า :</div></td>
<td class="style57">&nbsp;</td>
<td class="style74"><div><span class="style24">
<label> </label>
</span>
<label></label>
<label></label>
<label>
<input name="idtitlename" type="radio" value="1" <? if($idtitlename==1){?>checked<? }?> />
นาย <span class="style59">&nbsp;</span></label>
<span class="style69">
<label></label>
</span>
<label></label>
&nbsp;&nbsp;
<input name="idtitlename" type="radio" value="2" <? if($idtitlename==2){?>checked<? }?>/>
นาง <span class="style69">&nbsp;</span>
<input name="idtitlename" type="radio" value="3" <? if($idtitlename==3){?>checked<? }?>/>
นางสาว<span class="style69">&nbsp;</span> </div></td>
</tr>
<tr>
<td height="36" class="style62"><div align="right" class="style68">ชื่อ-สกุล :</div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<label>
<input name="fristname" type="text" value="<?= $fristname?>" />
</label>
<label>
<input name="lastname" type="text" value="<?= $lastname?>"/>
</label> </td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">สาขาวิชา :</div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<label></label>
<span class="style24">
<label></label>
</span><span class="style24">
<label></label>
</span>
<input name="namefield" type="text" id="namefield" value="<?= $namefield?>"/></td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">ที่อยู่ : </div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<textarea name="address" cols="25" rows="5" id="address"><?= $address1?>
</textarea></td>
</tr>
<tr>
<td height="41" class="style62"><div align="right" class="style68">เบอร์โทรศัพท์ : </div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<input name="tel2" type="text" id="tel2" value="<?= $tel1?>"/></td>
</tr>
<tr>
<td width="22%" height="30" class="style62"><div align="right" class="style68">ชื่อสถานประกอบการ :</div></td>
<td width="3%" class="style57">&nbsp;</td>

<td width="75%" class="style57"><span class="style24">
<label></label>
</span>
<label></label>
<span class="style24">
<label></label>
</span><span class="style24">
<label></label></span>
<div align="left">

<input name="nameestablishment" type="text" id="nameestablishment" value="<?= $nameestablishment?>" />
&nbsp;
<input name="CONTENT2" type="button" class="txtcontent" value="ค้นหา" onclick="window.location.href ='selectestablishment.php'"/>
</div>
</a></td>
</tr>
<tr>
<td height="26" class="style62"><div align="right" class="style68">ที่ตั้ง :</div></td>
<td class="style57">&nbsp;</td>
<td class="style74"><div><span class="style24">
<label> </label>
</span>
<label></label>
<label></label>
<label>
<textarea name="address1" id="address1"><? echo $address?>
</textarea>
</label>
</div></td>
</tr>
<tr>
<td height="36" class="style62"><div align="right" class="style68">จังหวัด :</div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<label>
<input name="province" type="text" id="province" value="<?= $nameprovince?>" />
</label> </td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">เบอร์โทรศัพท์ :</div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<label></label>
<span class="style24">
<label></label>
</span><span class="style24">
<label></label>
</span>
<input name="tel1" type="text" id="tel1" value="<?= $tel?>"/></td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">E-mail : </div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><span class="style24">
<label></label>
</span>
<input name="email1" type="text" id="email1" value="<?= $email?>"/></td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">วันที่เริ่มฝึกงาน : </div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><input type="text" name="textfield" /></td>
</tr>
<tr>
<td height="30" class="style62"><div align="right" class="style68">วันที่สิ้นสุดการฝึกงาน : </div></td>
<td class="style57">&nbsp;</td>
<td class="style57"><input type="text" name="textfield2" /></td>
</tr>
<tr>
<td height="30" class="style62">&nbsp;</td>
<td class="style57">&nbsp;</td>
<td class="style57">&nbsp;</td>
</tr>
</table>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>


คือว่าเวลาค้นหาข้อมูลนักศึกษาดึงข้อมูลมาแสดงใน textfield ได้แล้วพอมาค้นหาสถานประกอบข้อมูลนักศึกษาที่แสดงใน textfield มันก็หายไปเลย จะทำอย่างไรไม่ให้ข้อมูลหายดีค่ะ ขอผู้รู้ช่วยอธิบายด้วยนะค่ะ ขอบคุณล่วงหน้าค่ะ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-04-01 15:51:03 By : hmamui View : 781 Reply : 2
 

 

No. 1



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



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

เขียนเป็น $_ SESSION[''] ครับให้มันจำค่า idstudent






Date : 2009-04-02 12:50:49 By : teez1232002
 


 

No. 2



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



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


ขอโค้ดใหม่ได้ไหม เอาแบบระบุมาเลยนะ ว่าอยู๋ตรงไหน ดูไม่ออก
Date : 2009-04-02 13:19:33 By : sillyman24
 

   

ค้นหาข้อมูล


   
 

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