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 > เพิ่มข้อมูลแต่ไม่แสดงในหน้าหน้า แสดงเป็นช่องว่างไม่มีข้อความที่เพิ่ม DBเก็บแต่ไม่แสดงข้อความเหมือนกัน



 

เพิ่มข้อมูลแต่ไม่แสดงในหน้าหน้า แสดงเป็นช่องว่างไม่มีข้อความที่เพิ่ม DBเก็บแต่ไม่แสดงข้อความเหมือนกัน

 



Topic : 126090



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



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




เพิ่มข้อมูลลงในฟอร์ม แต่ DB เก็บเป็นค่าว่างเฉยๆๆค่ะ
เขียนโค้ดหน้าเพิ่มข้อมูลเเบนี้ค่ะ

Code (PHP)
<?php
session_start();
include ('connect.php');//เรียกใช้ไฟล์connect.php
error_reporting (E_ALL ^ E_NOTICE); //ดัก noticeออกไป
if($_POST["Save"]){
	
	$str="INSERT INTO meeting
VALUES (' ".$_POST["meeting_id"]." ',  ' ".$_POST["meeting_name "]." ',  ' ".$_POST["agen "]." ',  ' ".$_POST["agenda"]." ',  ' ".$_POST["meet_no "]." ',  ' ".$_POST["date_meet_up "]." ', ' ".$_POST["	meet_description"]." ' , ' ".$_POST["p_id"]." ')";
	mysql_query($str) or die (mysql_error());  
	echo "<script type='text/javascript'>alert('บันทึกข้อมูลเรียบร้อยแล้ว')</script>";
    echo "<meta http-equiv ='refresh'content='0;URL=show_meeting.php'>";
}			
?>
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Head.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<STYLE type=text/css>
  A:link { color: #0000cc; text-decoration:none}
  A:visited {color: #0000cc; text-decoration: none}
  A:hover {color: red; text-decoration: none}
</STYLE>
<style type="text/css">
<!--
small { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; } 
input, textarea { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; } 
b { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; } 
big { font-family: Arial, Helvetica, sans-serif; font-size: 16pt; } 
strong { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight : extra-bold; } 
font, td { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; } 
BODY { font-size: 10pt; font-family: Arial, Helvetica, sans-serif; } 
-->
</style>
<!-- InstanceBeginEditable name="doctitle" -->
<!-- InstanceEndEditable -->
<title>:: ระบบจัดเก็บเอกสาร ::</title>
</head>

<body>
<table width="100%"><tr><td><img src="image/head1.png" width="100%" /></td></tr></table>
<table align="center">
<tr> 
     <td colspan="2"><div align="center"> [ <a href="show_project.php">โครงการทั้งหมด</a> 
        ][ <a href="show_contract.php">สัญญาหลัก</a> ][ <a href="show_meeting.php">เอกสารการประชุม</a>][ 
        <a href="show_company.php">เอกสารบริษัท</a> ][ <a href="show_core_fiber.php">ข้อมูลเทคนิค</a> ][ <a href="logout.php">ออกจากระบบ</a> ]
</div></td>
</tr></table>

<br>

<form><table align="right"><tr><td>
  
  <!-- เริ่มต้น Code แสดง วัน/เวลา -->
  <script type="text/javascript">

// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.

//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:

//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = '<? print date("F d, ,Y H:i:s", time())?>'  //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var montharray=new Array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม")
var serverdate=new Date(currenttime)

function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}

function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
var datestring = padlength(serverdate.getDate()) + " " + montharray[serverdate.getMonth()] + " "+serverdate.getFullYear()
var timestring = padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertime").innerHTML=datestring+" , "+timestring
}

window.onload=function(){
setInterval("displaytime()", 1000)
}

</script><span id="servertime"></span>
<!-- สิ้นสุด Code แสดง วัน/เวลา -->
</td></tr></table></form>

<br>

<!-- InstanceBeginEditable name="Topic" -->
<form name="form1" method="post">
<table align="center">
              <tr>
                <th colspan="2" align="center" bgcolor="#FFFF99" scope="col" >เพิ่มวาระการประชุม</th>
              </tr>
              <tr>
              <td align="right">โปรเจค : </td>
              					<td> 
                        <label for="p_id"></label>
                                <select name="p_id" id="p_id">
                          <option selected="selected">--กรุณาเลือก--</option>
                        <option value="1">MA Fiber</option>
                        <option value="2">MA Equipment</option>
                </select></td></tr>
                    <tr>
                <td width="45%"  align="right">วันที่อัพเอกสาร :</td>
                <td ><label for="date_meet_up"></label>
                  <input type="date" name="date_meet_up" id="date_meet_up" ; />
                  <font color="#FF0000">*</font></td>
              </tr>
              <tr>
                <td width="45%"  align="right">ชื่อเอกสารแนบวาระ :</td>
                <td ><label for="meeting_name"></label>
                  <input type="text" name="meeting_namer" id="meeting_name" />
                  <font color="#FF0000">*</font></td>
              </tr>
                            <tr>
                <td  align="right">วาระครั้งที่ :</td>
                <td ><label for="agen"></label>
                   <input type="text" name="agen" id="agen" onkeyup="if(this.value*1!=this.value) this.value='' ;"   />
                  <font color="#FF0000">*</font></td>
              </tr>
              <tr>
                <td width="45%"  align="right">รายละเอียด :</td>
                <td ><label for="meet_description "></label>
                  <input type="text" name="meet_description " id="meet_description "/>
                  <font color="#FF0000">*</font></td>
              </tr>
           <br />
              
              <tr>
                <th  colspan="2" align="center" bgcolor="#FFFF99" scope="col" >เอกสารแนบวาระ</th>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td width="132" align="right">แนบเอกสารวาระ_1&nbsp;</td>
                <td><input type="file" name="filUpload[]"></td>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td align="right">แนบเอกสารวาระ_2&nbsp;</td>
                <td><input type="file" name="filUpload[]"></td>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td align="right">แนบเอกสารวาระ_3&nbsp;</td>
                <td><input type="file" name="filUpload[]"></td>
              </tr>
              <tr>
                <th  colspan="2" align="center" bgcolor="#FFFF99" scope="col" >เอกสารรายงานการประชุม</th>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td width="132" align="right">รายงานการประชุม_1&nbsp;</td>
                <td><input type="file" name="filUpload[]" /></td>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td align="right">รายงานการประชุม_2&nbsp;</td>
                <td><input type="file" name="filUpload[]"  /></td>
              </tr>
              <tr bgcolor="#FFFFCC">
                <td align="right">รายงานการประชุม_3&nbsp;</td>
                <td><input type="file" name="filUpload[]" /></td>
              </tr>
              </table>
        
                <p align="center"> 
        <input type="submit"  name="Save" id="Save" value="บันทึก" />
          <input type="reset" name="cancel" id="cancel" value="ยกเลิก" />
        </p>
</td>
</tr>
      </table></form>


<!-- InstanceEndEditable -->
</body>

<!-- InstanceEnd --></html>


output

แสดง

ฐานข้อมูล ตาราง meeting

DB



Tag : PHP, MySQL









ประวัติการแก้ไข
2017-01-18 15:37:48
2017-01-18 15:38:29
2017-01-18 15:38:52
2017-01-18 15:39:30
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2017-01-18 15:36:09 By : nachon View : 587 Reply : 1
 

 

No. 1



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



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


Code (SQL)
$str="INSERT INTO meeting
VALUES (' ".$_POST["meeting_id"]." ',  ' ".$_POST["meeting_name "]." ',  ' ".$_POST["agen "]." ',  ' ".$_POST["agenda"]." ',  ' ".$_POST["meet_no "]." ',  ' ".$_POST["date_meet_up "]." ', ' ".$_POST["	meet_description"]." ' , ' ".$_POST["p_id"]." ')";
	mysql_query($str) or die (mysql_error()); 



insert into table_name column(column1,2,3.....n) values(values1,2,3,....,n)

รูปแบบมันเป้นแบบนี้นี่นา






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-01-18 16:20:49 By : limberger
 

   

ค้นหาข้อมูล


   
 

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