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 > แก้เรื่อง listmenu กับโชว์เวลา ไม่ตกจริงๆ ผมทำอยู่นานแล้ว listmenu ไม่ยอมเก็บในฐานข้อมูล



 

แก้เรื่อง listmenu กับโชว์เวลา ไม่ตกจริงๆ ผมทำอยู่นานแล้ว listmenu ไม่ยอมเก็บในฐานข้อมูล

 



Topic : 024790



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



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




ผมทำอยู่นานแล้ว listmenu ไม่ยอมเก็บในฐานข้อมูล อยากได้เรื่องดึงเวลา มาโชว์ด้วยไม่รู้code ครับผมมี code มาให้ช่วยแก้ครับ


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=tis620_bin" />
<title>แบบฟอร์มแจ้งปัญหา</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:534px;
height:617px;
z-index:1;
left: 264px;
top: 213px;
}
#Layer2 {
position:absolute;
width:56px;
height:21px;
z-index:2;
left: 97px;
top: 40px;
}
#Layer3 {
position:absolute;
width:82px;
height:21px;
z-index:2;
left: 84px;
top: 84px;
}
#Layer4 {
position:absolute;
width:32px;
height:20px;
z-index:2;
left: 130px;
top: 124px;
}
#Layer5 {
position:absolute;
width:39px;
height:22px;
z-index:2;
left: 123px;
}
#Layer6 {
position:absolute;
width:43px;
height:26px;
z-index:2;
left: 114px;
top: 337px;
}
#Layer7 {
position:absolute;
width:294px;
height:70px;
z-index:2;
left: 288px;
top: 38px;
}
#Layer8 {
position:absolute;
width:329px;
height:77px;
z-index:3;
left: 578px;
top: 38px;
}
.style2 {
font-size: 16px;
font-weight: bold;
color: #0000FF;
}
#Layer9 {
position:absolute;
width:750px;
height:1px;
z-index:4;
left: 156px;
top: 203px;
background-color: #CCCCCC;
}
#Layer10 {
position:absolute;
width:1px;
height:596px;
z-index:5;
left: 156px;
top: 203px;
background-color: #CCCCCC;
}
#Layer11 {
position:absolute;
width:1px;
height:596px;
z-index:6;
left: 906px;
top: 203px;
background-color: #CCCCCC;
}
#Layer12 {
position:absolute;
width:750px;
height:0px;
z-index:7;
left: 491px;
top: 162px;
background-color: #CCCCCC;
}
#Layer13 {
position:absolute;
width:83px;
height:21px;
z-index:8;
left: 82px;
top: 294px;
}
#Layer14 {
position:absolute;
width:53px;
height:20px;
z-index:7;
left: 391px;
top: 465px;
}
#Layer15 {
position:absolute;
width:751px;
height:1px;
z-index:8;
left: 155px;
background-color: #CCCCCC;
top: 797px;
}
#Layer16 {
position:absolute;
width:76px;
height:21px;
z-index:9;
left: 87px;
top: 209px;
}
.style10 {font-size: 80%;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
}
.style11 {font-size: 100%}
.style12 {font-size: 16px; font-family: "Courier New", Courier, monospace; }
.style13 {font-size: 80%; font-family: "Courier New", Courier, monospace; }
.style14 {font-weight: bold}
.style3 {font-family: "Courier New", Courier, monospace}
.style4 {font-size: 80%;
font-weight: bold;
}
.style6 {font-size: 80%}
.style7 {font-size: 100%;
font-family: "Courier New", Courier, monospace;
}
.style8 {color: #0000FF; font-size: 16px;}
.style9 {font-size: 16px
}
#apDiv1 {position:absolute;
width:513px;
height:36px;
z-index:9;
left: 396px;
top: 115px;
}
-->
</style>

<style type="text/css">
<!--
#apDiv2 {
position:absolute;
width:97px;
height:82px;
z-index:10;
left: 157px;
top: 120px;
}
#apDiv3 { position:absolute;
width:48px;
height:41px;
z-index:10;
left: 856px;
top: 158px;
}
.style15 {color: #FF0000}
.style16 {
color: #FF0000;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
}
#apDiv4 {
position:absolute;
width:122px;
height:77px;
z-index:10;
left: 156px;
top: 38px;
}
.style17 {
font-size: 14px;
font-weight: bold;
}
-->
</style>
</head>
<div id="Layer1">
<p align="center" class="style2"> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;แบบฟอร์มแแจ้งซ่อม</p>
<form id="from1" name="from1" method="post" action="form_service1.php">
<div align="center">
<p>&nbsp;</p>
<label><span class="style3 style15"><strong>ครุภัณฑ์:</strong></span>
<input type="text" name="id" />
<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="style3 style15"><strong>ชื่อ :</strong></span>
<input type="text" name="name" />
<br />
<br />
&nbsp;<span class="style3 style15"><strong>นามสกุล :</strong></span>
<input type="text" name="sname" />
&nbsp;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;วัน
<select name="select" id="select">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
เดือน
<select name="select2" id="select2">
<option>มกราคม</option>
<option>กุมภาพันธ์</option>
</select>
ปี
<select name="select3" id="select3">
<option>2550</option>
</select>
<br />
&nbsp;&nbsp;<br />
<span class="style15"><strong>&nbsp;&nbsp;&nbsp;&nbsp;เวลา</strong>:</span>
<input type="text" name="time" />
<br />
<br />
<span class="style3 style15"><strong>เบอร์โทร :</strong></span>
<input type="text" name="tel" />
&nbsp;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style15"><span class="style17">&nbsp;</span></span>หน่วยงาน
<select name="select5" id="select5">
<option>สบอ</option>
<option>สพต</option>
</select>
</label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<p>
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ประเภท
<select name="select4" id="select4">
<option>computer</option>
<option>monitor</option>
<option>printer</option>
</select>
</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>
<label><span class="style3 style15"><strong>&nbsp;&nbsp;รายละเอียดของปัญหา</strong></span><span class="style15">:</span>
<textarea name="maintainance" cols="45" rows="5"></textarea>
</label>
</p>


<input type="submit" name="Submit" value="บันทึกข้อมูล" >
<input type="reset" name="Submit2" value="แก้ไข" >
<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style3 style15"><strong>&nbsp;&nbsp;</strong></span></label>
</p>
<p>
<label></label>
</p>
<p>
<label></label>
</p>
</div>
</form>
<p>&nbsp;</p>
</div>
<div id="Layer7"><img src="../image/main page/images/template83_r1_c6.jpg" width="291" height="77" /></div>
<div id="Layer8"><img src="../image/main page/images/template83_r1_c8.jpg" width="331" height="77" /></div>
<div id="Layer9"></div>
<div id="Layer10"></div>
<div id="Layer11"></div>
<div id="Layer15"></div>
<div id="apDiv4"><img src="../image/TL1_dep.jpg" width="130" height="76" /></div>

</html>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-02-17 15:48:58 By : Super_Pui View : 1194 Reply : 3
 

 

No. 1



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



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


คือว่าถ้ามีปัญหาในการเก้บลงฐานข้อมูล กรุณาเอาโค๊ดในการเก้บลงฐานข้อมูลมาให้ดูซิคับ นี่มีแค่ฟอร์ม HTML ธรรมดา ผมก็ไม่ทราบคับว่าปัญหาเกิดจากอะไรแน่

ส่วนเรื่องดุงเวลานี่ดึงเอามาทำอะไรคับแสดงในฟอร์มเฉยๆ หรือว่าจะเก็บข้อมูลเวลาตอนกรอกฟอร์มด้วย






Date : 2009-02-17 17:28:07 By : zankumuro
 


 

No. 2



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



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


<html>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:65px;
height:27px;
z-index:1;
top: 290px;
left: 590px;
}
body {
background-color: #FFFFFF;
}
#Layer2 {
position:absolute;
width:263px;
height:70px;
z-index:2;
left: 282px;
top: 36px;
}
#Layer3 {
position:absolute;
width:416px;
height:77px;
z-index:3;
left: 583px;
top: 36px;
}
#Layer4 {
position:absolute;
width:848px;
height:1px;
z-index:4;
left: 155px;
top: 167px;
background-color: #CCCCCC;
}
#apDiv1 {
position:absolute;
width:128px;
height:77px;
z-index:5;
left: 153px;
top: 36px;
}
#apDiv2 {
position:absolute;
width:384px;
height:32px;
z-index:6;
left: 618px;
top: 114px;
}
-->
</style>
<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {
font-size: 100px;
font-weight: bold;
}
.style3 {
font-size: 14px;
color: #0000FF;
}
.style4 {
font-size: 14px;
color: #FF0000;
font-weight: bold;
}
.style5 {font-size: 14px; color: #0000FF; font-weight: bold; }
-->
</style>
<body>
<div align="center">
<p>&nbsp; </p>
<div id="Layer2"><img src="image/main page/images/template83_r1_c6.jpg" width="302" height="77"></div>
<div id="Layer3"><img src="image/template83_r1_c8.jpg" width="418" height="77"></div>
<div id="apDiv1"><img src="image/logodep1.jpg" width="133" height="77"></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="apDiv2">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li class="style2"><a href="table_service.php" target="_parent" class="style3">ดูข้อมูลแจ้งซ่อม</a> </li>
<li><a href="form_service.php" target="_parent" class="style5">แจ้งซ่อมเพิ่มเติม</a></li>
<li>
<div align="center"><a href="#" class="style4">กลับหน้าหลัก</a></div>
</li>
</ul>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="Layer4"></div>
<p>&nbsp;</p>
<p>
<?
$host="localhost";
$username="root";
$password="3118";
$db="dep";
$tb="service";

$connect= mysql_connect( $host,$username,$password) or die ("ติดต่อกับฐานข้อมูล Mysql ไม่ได้ ");

mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้");
$sql="select * from $tb where id=$id";
$db_query=mysql_db_query($db,$sql);
$num_rows=mysql_num_rows($db_query);
if($num_rows != 0) /* ตรวจสอบว่า Id นี้มีอยู่หรือยัง */
{
echo"<center><br>รหัส Id นี้มีอยู่แล้ว </center>";
//<div id="Layer1"><a href="adddata.php"><img src="image/back1.jpg" alt="กลับหน้าเดิม" width="71" height="29" border="0"></a></div>
exit();

}
else
{

mysql_query("INSERT INTO $tb(id,name,sname,date,time,tel,location,type,maintainance)
values('$id','$name','$sname','$date', '$time','$tel','$location','$type','$maintainance')")or die("เพิ่มข้อมูลลงฐานข้อมูลไม่ได้");
echo"เพิ่มข้อมูลลงฐานข้อมูลเรียบร้อยแล้ว";
}
mysql_close($connect);
?>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</div>
<div id="Layer1"><a href="index_user.php"><img src="image/back1.jpg" alt="กลับหน้าเดิม" width="66" height="25" border="0"></a></div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>

Date : 2009-02-17 17:53:01 By : Super_Pui
 

 

No. 3



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



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


เท่าที่ผมดู ไม่มี list menu อยู่ 3 ตัว คือ select: วันที่, select2: เดือน และ select3: ปี

แต่จากที่ดูตอนอัพเดทลงฐานข้อมูล ไม่เห็นอัพเดทฟิลด์พวกนี้เลย

Code (PHP)
<?php
mysql_query("INSERT INTO $tb(id,name,sname,date,time,tel,location,type,maintainance)
values('$id','$name','$sname','$date','$time', '$tel','$location','$type','$maintainance')")or die("เพิ่มข้อมูลลงฐานข้อมูลไม่ได้");
echo"เพิ่มข้อมูลลงฐานข้อมูลเรียบร้อยแล้ว";
?>

Date : 2009-02-17 21:19:00 By : ochitae
 

   

ค้นหาข้อมูล


   
 

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