รายละเอียดบริการลงโฆษณา
 บริการจดโดเมนเนม เว็บไซด์ .Com, .Net, .Org เพียง 550 บาท / ปี    สำหรับโดเมนอื่นๆ คลิกเพื่อดูรายละเอียด สายด่วน WebSite, Domain, Hosting
 คลิก Banner เพื่อสนับสนุนเว็บไทยดีดี กำลังโหลดข้อมูล... 
   สนใจติดต่อโฆษณา คลิกดูรายละเอียด    โทร. 02-591-7857, 087-499-5540 หน้าหลัก เว็บไทยดีดี | คำติชมของคุณ  
หน้าแรกเว็บไทยดีดี บทความ PHP เว็บบอร์ด PHP แจ้งชำระเงิน ลงโฆษณากับเรา
  Webmaster Talk     webmasterwebthaidd.com
Webthaidd.COM 2.9 Beta Community Version
Build 0979
ปรับการใช้งานเว็บบอร์ดใหม่ เข้าถึงการเรียนรู้ได้มากขึ้น
เว็บบอร์ดใหม่ URL : http://www.webthaidd.com/webboard
เว็บบอร์ดเก่า URL : http://www.webthaidd.com/board
 
แจ้งปัญหาการใช้งาน หรือแนะนำติชม
webmaster@webthaidd.com
   หน้าแรกเว็บบอร์ด   ช่วยเหลือ ค้นหา เข้าสู่ระบบ สมัครสมาชิก  
กันยายน 10, 2010, 12:12:16 pm
นิตยสารออนไลน์ ฉบับแรกของคนไทย
ยินดีต้อนรับคุณ, บุคคลทั่วไป
กรุณาเข้าสู่ระบบ หรือ สมัครสมาชิก
 
 
 
ส่งอีเมล์ยืนยันการใช้งาน?
สมัครสมาชิก
ลืมรหัสผ่าน
วิธีใช้งานระบบ
 
ออกแบบเว็บไซต์ (Design)
พัฒนาโปรแกรมเฉพาะด้าน (Dev)
ปรับปรุงเว็บไซต์ (Re Design)
จดโดเมนเนม (Domain)
เช่าพื้นที่จัดทำเว็บไซต์ (Hosting)
แจ้งชำระเงิน
 
  ร่วมเผยแพร่ความรู้ ส่งบทความ : คลิกที่นี่
PHP Programing
HTML Home Page
Macromedia Dreamweaver
Namo WebEditor
Macromedia Flash
Adobe Photoshop
Adobe illustrator
3ds max
Java Scripts
C,C++ Programing
Microsoft Word
Microsoft Excel
Microsoft PowerPoint
Microsoft Access
คอมพิวเตอร์ทั่วไป
ความรู้เกี่ยวกับ Flash Drive
 
เครื่องมือทำเว็บ ออนไลน์
ค้นหาเว็บไทย (Web Directory)
วิทยุ เพลงออนไลน์ (Radio)
EXPERTISE MSN
เว็บบอร์ด ถาม-ตอบปัญหา
แบบสำรวจ (Poll)
 
   รายละเอียดโฆษณาบนเว็บ คลิกที่นี่
php.net
phpmyadmin.net
mysql.com
simplemachines.org
 
บทความ PHP Programing ออนไลน์       Webthaidd Basic and Advance E-learning
จัดทำโดย : first     แสดง 37,004 ครั้ง  เว็บบอร์ด   ส่งให้เพื่อน   พิมพ์
การสร้างตารางนัดหมายแบบง่าย ๆ
Untitled Document

การสร้างตารางนัดหมายแบบง่าย ๆ

1.ให้สร้างไฟล์ calendar.php ตามนี้

<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
-->
</style>

<form id="form1" name="form1" method="post" action="">
<table width="0" border="0" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="f2f2f2"><div align="center"><font color="#0000FF" style="font-family:sans-serif"

size="+6">
<?
<?
$a= date(j);
// , 1 to 31
$b = date(a); // am,
$c = date(A); // AM,
$d = date(B); // Swatch Internet time 000 -999
$e = date(d); // , 01 to 31
$f = date(D); // , sat
$g = date(F); // , November
$h = date(g); // , 1 through 12
$hh = date(G); // , 0 through 23
$i = date(h); // , 01 through 12
$j = date(H); // , 00 through 23
$k = date(i); // , 00 to 59
$l = date(I); // 0, 1 if Daylight Savings Time, 0 otherwise.
$m = date(l); // , Sunday through Saturday
$n = date(L); // 0, 1 if it is a leap year, 0 otherwise.
$o = date(m); // , 01 through 12
$p = date(M); // , Jan through Dec
$q = date(n); // , 1 through 12
$r = date(o); // Example: +0200
$s = date(r); // Example: Thu, 21 Dec 2000 16:01:07 +0200
$t = date(s); // 00 through 59
$u = date(S); // st, nd, rd or th. Works well with j
$v = date(t); // 28 through 31
$w = date(T); // time zoneseting Examples: EST, MDT ...
$x = date(u); // See also time()
$y = date(w); // 0 (for Sunday) through 6 (for Saturday)
$z = date(W); // Example: 42 (the 42nd week in the year)
$aa = date(y); // Examples: 99 or 03
$bb = date(Y); // Examples: 1999 or 2003
$cc = date(z);
$dd = date(Z);

if(!$mon){
$mon = $o ;
}else{
$mon = $mon ;

}
if(!$year){
$year = $bb ;
}else{
$year = $year;
}
$firstday = mktime(0,0,0,$mon,1,$bb);
$firstdays = date('w',$firstday);
$lastdays = date('t',$firstday);
$year_view = date('Y',$firstday);
$mon_view = date('m',$firstday);
echo"
<script>
function d_s( su , mnp){
if(mnp == 'm'){
document.dat_form.mon.value = su - 1 ;
}else{
document.dat_form.mon.value = su + 1 ;
}
document.dat_form.submit();
}
</script>
<form name=dat_form action='$PHP_SELF' method=post>
<input type=hidden name=mon value=''>

<table border=1 width=140 cellpadding=0 cellspacing=0 bordercolor=#999999>
<tr bgcolor=pink>
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a>&nbsp;$year_view -

$mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
</tr>
</form>
<tr align=center><td><font color=red>อา</a></td><td>จ</td><td>อ</td><td>พ</td><td>

พฤ</td><td>ศ</td><td><font color=blue>ส</font></td></tr>
<tr align=right>";
////
for($i = 0; $i < 7 ; $i++){
if($firstdays == $i){
break;
}
else{
echo"<td width=8>&nbsp;</td>";
}
$week++;
}

for($i=1; $i<=$lastdays ;$i++){
if($week % 7 == 0){
echo"</tr><tr align=right>";
}
if($a == $i){
$bgcolor = "bgcolor=pink";
}else{
$bgcolor = '';
}

if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"
calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"
calendar.php?test=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}

while($week%7!=0){
echo"<td>&nbsp;</td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการบันทึกตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="textfield" type="text" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">เรื่อง</td>
<td bgcolor="f2f2f2"><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<td valign="top" bgcolor="f2f2f2">รายระเอียด</td>
<td bgcolor="f2f2f2"><label>
<textarea name="textarea" cols="50" rows="5" wrap="virtual"></textarea>
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">&nbsp;</td>
<td bgcolor="f2f2f2"><label>
<div align="center">
<input type="submit" name="Submit" value="บันทึก" />
</div>
</label></td>
</tr>
</table>
</form>

ผลที่ได้คือ

2. ฐานข้อมูลชื่อ datatest นะครับ สร้าง table ชื่อ diary

CREATE TABLE `diary` ( `id` INT( 2 ) NOT NULL AUTO_INCREMENT ,
`date` VARCHAR( 10 ) NOT NULL ,
`subject` VARCHAR( 50 ) NOT NULL ,
`detail` TEXT NOT NULL ,
PRIMARY KEY ( `id` ) );

3.เรามาลองสร้างไฟล์ sample.php เพื่อบันทึกตารางนัดหมายนี้ลงฐานข้อมูลนะครับ

<?
$hostname="localhost";
$user="root";
$passwd="";
$dbname="datatest";
$tbname="diary";
mysql_connect($hostname,$user,$password) or die("Not Connection Mysql");
mysql_select_db($dbname) or die("Not Select Date Base");
$sql="INSERT INTO `diary` ( `date` , `subject` , `detail` ) VALUES ('$date', '$subject', '$detail่')";
$dbquery=mysql_db_query($dbname,$sql);
mysql_close();
echo "บันทึกข้อมูลเรียบร้อยแล้ว";
?>

ผลที่ได้จากการบันทึกจะแสดงข้อความ

4.เราลองสร้างไฟล์ fine_diary.php เพื่อค้นหาตารางนัดหมายกันตาม code ด้านล่างนี้

<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
-->
</style>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<form id="form1" name="form1" method="post" action="sample2.php">
<table width="0" border="0" cellpadding="1" cellspacing="1">
<tr>
<td bgcolor="f2f2f2"><div align="center"><font color="#0000FF" style="font-family:sans-serif"

size="+6">
<?

$a= date(j); // , 1 to 31
$b = date(a); // am,
$c = date(A); // AM,
$d = date(B); // Swatch Internet time 000 -999
$e = date(d); // , 01 to 31
$f = date(D); // , sat
$g = date(F); // , November
$h = date(g); // , 1 through 12
$hh = date(G); // , 0 through 23
$i = date(h); // , 01 through 12
$j = date(H); // , 00 through 23
$k = date(i); // , 00 to 59
$l = date(I); // 0, 1 if Daylight Savings Time, 0 otherwise.
$m = date(l); // , Sunday through Saturday
$n = date(L); // 0, 1 if it is a leap year, 0 otherwise.
$o = date(m); // , 01 through 12
$p = date(M); // , Jan through Dec
$q = date(n); // , 1 through 12
$r = date(o); // Example: +0200
$s = date(r); // Example: Thu, 21 Dec 2000 16:01:07 +0200
$t = date(s); // 00 through 59
$u = date(S); // st, nd, rd or th. Works well with j
$v = date(t); // 28 through 31
$w = date(T); // time zoneseting Examples: EST, MDT ...
$x = date(u); // See also time()
$y = date(w); // 0 (for Sunday) through 6 (for Saturday)
$z = date(W); // Example: 42 (the 42nd week in the year)
$aa = date(y); // Examples: 99 or 03
$bb = date(Y); // Examples: 1999 or 2003
$cc = date(z);
$dd = date(Z);

if(!$mon){
$mon = $o ;
}else{
$mon = $mon ;

}
if(!$year){
$year = $bb ;
}else{
$year = $year;
}
$firstday = mktime(0,0,0,$mon,1,$bb);
$firstdays = date('w',$firstday);
$lastdays = date('t',$firstday);
$year_view = date('Y',$firstday);
$mon_view = date('m',$firstday);
echo"
<script>
function d_s( su , mnp){
if(mnp == 'm'){
document.dat_form.mon.value = su - 1 ;
}else{
document.dat_form.mon.value = su + 1 ;
}
document.dat_form.submit();
}
</script>
<table border=1 width=140 cellpadding=0 cellspacing=0 bordercolor=#999999>
<tr bgcolor=pink>
<td colspan=7 align=center><a href=\"javascript:d_s($mon,'m')\"><</a>&nbsp;$year_view - $mon_view <a href=\"javascript:d_s($mon,'p')\">></a></td>
</tr>
<tr align=center><td><font color=red>อา</a></td><td>จ</td><td>อ</td><td>พ</td><td>พฤ</td><td>ศ</td><td><font color=blue>ส</font></td></tr>
<tr align=right>";
////
for($i = 0; $i < 7 ; $i++){
if($firstdays == $i){
break;
}
else{
echo"<td width=8>&nbsp;</td>";
}
$week++;
}

for($i=1; $i<=$lastdays ;$i++){
if($week % 7 == 0){
echo"</tr><tr align=right>";
}
if($a == $i){
$bgcolor = "bgcolor=pink";
}else{
$bgcolor = '';
}

if($week%7==0){
echo"<td $bgcolor><font size=2 color=red><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}else if($week%7==6){
echo"<td $bgcolor><font size=2 color=blue><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}else{ //
echo"<td $bgcolor><font size=2><a href=\"sample2.php?date=$i/$mon_view/$year_view\">$i</a></font></td>";
}
$week++;
}

while($week%7!=0){
echo"<td>&nbsp;</td>";
$week++;
}
echo"</tr>
</table>
";
?>
</font></div></td>
<td bgcolor="f2f2f2"><div align="center">เลือกวันที่ต้องการค้นหาตารางนัด</div></td>
</tr>
<tr>
<td bgcolor="f2f2f2"></td>
<td bgcolor="f2f2f2"><img name="" src="" width="250" height="2" alt="ห" /></td>
</tr>
<tr>
<td bgcolor="f2f2f2">วัน/เดือน/ปี</td>
<td bgcolor="f2f2f2"><label>
<input name="date" type="text" id="date" value="<? echo $test; ?>" />
</label></td>
</tr>
<tr>
<td bgcolor="f2f2f2">&nbsp;</td>
<td bgcolor="f2f2f2"><label>
<label></label>
</label>
<label>
<div align="center">
<input type="submit" name="Submit" value="ค้นหา""/>
</div>
</label></td>
</tr>
</table>
</form>

ลองค้นหาข้อมูลดู

5.สร้างไฟล์ชื่อ sample2.php เพื่อทำหน้าที่รับข้อมูลจากไฟล์ fine_diary.php พิมพ์ code ดังนี้

<?
$hostname="localhost";
$user="root";
$passwd="";
$dbname="datatest";
$tbname="diary";
mysql_connect($hostname,$user,$password) or die("Not Connection Mysql");
mysql_select_db($dbname) or die("Not Select Date Base");
$sql="select * from $tbname where date='$_POST[date]'";
$dbquery=mysql_db_query($dbname,$sql);
$row=mysql_num_rows($dbquery);
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>

<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="59" bgcolor="#CCCCCC" scope="row"><div align="center">ลำดับที่</div></th>
<td width="59" bgcolor="#CCCCCC"><div align="center">วันเวลา</div></td>
<td width="44" bgcolor="#CCCCCC"><div align="center">เรื่อง</div></td>
<td width="220" bgcolor="#CCCCCC"><div align="center">รายระเีอียด</div></td>
</tr>
<?
for($i=1;$i<=$row;$i++){
$result=mysql_fetch_array($dbquery);
?>
<tr>
<th bgcolor="f2f2f2" scope="row"><div align="center"><? echo $i; ?></div></th>
<td bgcolor="#99CCCC"><div align="center"><? echo $result['date'];?></div></td>
<td bgcolor="f2f2f2"><div align="center"><? echo $result[subject]; ?></div></td>
<td bgcolor="#FFCCCC"><div align="center"><? echo $result[detail]; ?></div></td>
</tr>
<?
}
?>
</table>
</body>
</html>

ผลที่ได้จากการค้นหาคือ

ทดลองทำกันดูนะครับ

ความคิดเห็นผู้อ่านบทความนี้
ความเห็นที่ : 38 แจ้งลบ  
ของผมทำแล้วไม่ Eror แต่พอกดปุ่ม บันทึกแล้วมันไม่ขึ้นอะไรเลยอะ ท่านผู้รู้ช่วยผมหน่อยนะครับ
โดย : สุรินทร์    เมื่อ : 06 ธ.ค. 52  

ความเห็นที่ : 37 แจ้งลบ  
ช่วยอัพโค้ดส่วนที่แก้แล้วหน่อยครับของเก่าไฟล์มันหายไป ผมจำเป็นจะใช้ทำโครงงานใกล้กำหนดจะส่งแล้วช่วยผมทีนะครับ
โดย : kawee    เมื่อ : 01 ก.พ. 52  

ความเห็นที่ : 36 แจ้งลบ  
ช่วยอัพโค้ดส่วนที่แก้แล้วหน่อยครับของเก่าไฟล์มันหายไปโหลดไม่ได้
โดย : arthorn    เมื่อ : 03 ม.ค. 52  

ความเห็นที่ : 35 แจ้งลบ  
โค้ดไม่สมบูรณ์ครับ..ช่วยอัพให้ใหม่ด้วยครับ..ขอบคุณครับ
โดย : อัตธสิท คะดุน    เมื่อ : 30 ธ.ค. 51  

ความเห็นที่ : 34 แจ้งลบ  
อยากได้โค้ด แสดงเตือน ก่อนถึงวันนัดหมายอ่ะค่ะ ใครพอทราบบ้างค่ะ ช่วยทีนะ
โดย : ....    เมื่อ : 04 ธ.ค. 51  

ความเห็นที่ : 33 แจ้งลบ  
กดปุ่ม บันทึกแล้วไม่ยอมส่งค่าไปคะ ที่ action ส่งค่าไปหน้า sample.phpแล้วคะแต่มันไม่ไป
โดย : kuanglee    เมื่อ : 27 ส.ค. 51  

ความเห็นที่ : 32 แจ้งลบ  
แล้วถ้ามัน error อย่างนี้ทำไงค่ะ Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\hrm\calendarN.php on line
โดย : Mam    เมื่อ : 03 ก.ค. 51  

ความเห็นที่ : 31 แจ้งลบ  
ที่นี่ http://www.webthaidd.com/board/show_topic.php?q=2857 อ่ะ
โดย : ninku    เมื่อ : 26 พ.ค. 51  

ความเห็นที่ : 30 แจ้งลบ  
ดูที่แก้ ก็ทำไม่ได้หรอครับ
โดย : ninku    เมื่อ : 26 พ.ค. 51  

ความเห็นที่ : 29 แจ้งลบ  
แก้ได้หรือป่าวเนี่ยช่วยหน่อย ๆ นะค่ะ
โดย : ญญ    เมื่อ : 21 พ.ค. 51  

ความเห็นที่ : 28 แจ้งลบ  
เราทำแล้วนะคะพอกดตรงบันทึกแล้ว มันก็ไม่เปลี่ยนไปไหยเลยคะ ส่วนlinkที่บอกว่าแก้แล้วเราเข้าไปไม่ได้แล้วอะ ช่วยมาตอบหน่อยนะว่าเปงอย่างไร
โดย : เล๊ก    เมื่อ : 13 พ.ค. 51  

ความเห็นที่ : 27 แจ้งลบ  
ขอบคุณค่ะ ง่าๆๆ งง ใหญ่ ไก่ตาแดก จะพยายามทำค่ะ
โดย : nimshi    เมื่อ : 10 พ.ค. 51  

ความเห็นที่ : 26 แจ้งลบ  
ไม่ได้ค่ะ เวลาเราคลิกเลือกเดือนถัดไป หรือก่อนหน้า < > มันไม่ได้ค่ะ
โดย : ช่วยบอกที    เมื่อ : 01 พ.ค. 51  

ความเห็นที่ : 25 แจ้งลบ  
http://www.webthaidd.com/board/show_topic.php?q=2857 ที่ผมแก้ไปดูนะครับ
โดย : ninku    เมื่อ : 17 เม.ย. 51  

ความเห็นที่ : 24 แจ้งลบ  
หน้าสุดท้ายของการค้นหาน่ะมันยังไม่ขึ้นข้อมูลที่เราเลือกให้...ขึ้นแต่หัวข้อเท่านั้น
โดย : มิส    เมื่อ : 10 เม.ย. 51  

ความเห็นที่ : 23 แจ้งลบ  
ทำได้แล้วครับ แก้ตั้งนานโค้ตมันไม่สมบูรณ์น่ะครับต้องแก้นิดนึง อิอิ
โดย : GhostLocal    เมื่อ : 07 มี.ค. 51  

ความเห็นที่ : 22 แจ้งลบ  
บันทึกข้อมูลไม่ได้ค่ะทำไงดีค่ะ
โดย : potming@hotmail.com    เมื่อ : 06 ก.พ. 51  

ความเห็นที่ : 21 แจ้งลบ  
ผมลองทำดูก็ได้ครับ ? บันทึกข้อมูลได้ ,เรียกขึ้นมาดูได้ แต่ผมกด < ,> เพื่อลองเลือกเดือนเดินหน้าหรือถอยหลัง ไม่ได้ครับ ?? ไม่ทำงานซะงั้น ??
โดย : สถาพร    เมื่อ : 04 ก.พ. 51  

ความเห็นที่ : 20 แจ้งลบ  
ทำไมกด submit แล้วไม่ไปอะ งง
โดย : takob    เมื่อ : 24 ม.ค. 51  

ความเห็นที่ : 19 แจ้งลบ  
เลือกแสดงตารางนัดหมายทำได้แล้วค่ะ โค้ดที่ให้มายังผิดอยู่เหมอืนกัน ตอนนี้ติดอยู่ที่ว่าจะให้วันที่นัดหมาย แสดงสี อยากทราบวิธีคะ ใครพอรุ้บ้างว่าทำไง
โดย : princess_cyber    เมื่อ : 18 ม.ค. 51  

ความเห็นที่ : 18 แจ้งลบ  
ได้กันหรือยัง
โดย : create_ninku    เมื่อ : 18 ม.ค. 51  

ความเห็นที่ : 17 แจ้งลบ  
โค้ดนี้ยังมีข้อผิดพลาดอยู่นิดนึงนะคะ (สำหรับผู้ไม่รู้)เดี๋ยวจะบอกเป็นข้อๆให้ก่อน 1.ไฟล์ calendar.php -เครือ่งหมายเปิด php เกินมา 1 อันค่ะ - ตอนจบ php ก่อนโค้ดเริ่มสร้างตะราง(ก่อนบรรทัด ต้องการค้นหาตาราง) ตอ้งมีการส่งค่าก่อนนะคะ ไม่งั้นมันก็ไม่รู้ว่าจะส่งค่าไปที่ไหน ปุ่ม sunmit ก็จะไม่ทำงานค่ะ ดังนี้ <form method="post" action="sample.php"> โฟล์เดอร์แรกก็มีเท่านี้ 2.ไฟล์ sample.php -ต้องมีการรับค่ามาจาก ไฟล์ clendar.php ก่อนนะคะ เอาไว้บนสุดเลยก่อน จะ ติดต่อ db ดังนี้ $date=$_POST[textfield]; $subject=$_POST[textfield2]; $detail=$_POST[textarea]; หากว่าก๊อบโค้ด มา จากเวปนะคะ ตรง insert ข้อมูลลง db อย่าลืมแก้เครือ่งหมายด้วยนะคะ แค่นี้แหละค่ะ ลองทำกันดู เพราะเราลองมาได้แล้ว ถ้าไม่ได้ยังไงลองโพสถามต่อได้นะคะ อ่ออีกจุดหนึ่งก็คือ ตาม ค.ห 4เลยค่ะ ถ้าตอบได้ก็จะตอบให้ ขอบคุณเจ้าของกระทู้มากนะคะ เป็นประยชน์มากเลย ทำเสร็จแค่ นี้อยู่ เดวข้ออื่นลองไปทำดูกอ่นได้ไม่ได้ยังไงเดี๋ยวมาโพสบอกอีกทีค่ะ
โดย : princesscyber    เมื่อ : 17 ม.ค. 51  

ความเห็นที่ : 16 แจ้งลบ  
ไม่ได้มั่ว แต่ทำไม่เป็น ทำเป็นแล้วก็บอกันสิ ก็จะได้เป็น
โดย : boot    เมื่อ : 17 ม.ค. 51  

ความเห็นที่ : 15 แจ้งลบ  
มันไม่แสดงข้อมูลที่บันทึก เหมือนกันคะ ช่วยบอกหน่อยว่าต้องไปแก้ไขตรงไหนคะ
โดย : นก    เมื่อ : 17 ม.ค. 51  

ความเห็นที่ : 14 แจ้งลบ  
ถ้าทำได้ก็บอกมาสิครับ มันไม่แสดงข้อมูลที่บันทึก ถ้าจะให้แสดงต้องไปแก้ไขตรงไหนครับ คุณผู้ติดตาม
โดย : av    เมื่อ : 17 ม.ค. 51  

ความเห็นที่ : 13 แจ้งลบ  
เฮ้ย ผมยังทำได้เลย ไม่เป็นแล้วอย่ามั่วครีบ
โดย : ผู้ติดตาม    เมื่อ : 16 ม.ค. 51  

ความเห็นที่ : 12 แจ้งลบ  
ใครแก้ได้แล้วช่วยบอกที่ dachathorn-18@hotmail.com
โดย : dac    เมื่อ : 16 ม.ค. 51  

ความเห็นที่ : 11 แจ้งลบ  
ใช่ไม่ได้ โค้ดไม่สมบูรณ์
โดย : vb    เมื่อ : 16 ม.ค. 51  

ความเห็นที่ : 10 แจ้งลบ  
ไม่แสดงข้อมูลที่บันทึก โค้ดไม่สมบูรณ์
โดย : a    เมื่อ : 12 ม.ค. 51  

ความเห็นที่ : 9 แจ้งลบ  
ถึง jarfang ขอบคุณมากครับที่ช่วยแก้ไข
โดย : ninku    เมื่อ : 11 ม.ค. 51  

ความเห็นที่ : 8 แจ้งลบ  
ความเห็นที่ : 1 คือการ สร้าง Table ครับใช้ใน PHPadmin หรือ MySQL Front ก็ได้
โดย : ninku    เมื่อ : 11 ม.ค. 51  

ความเห็นที่ : 7 แจ้งลบ  
ดีจังจะได้เอาไปใช้ต่อ
โดย : jan    เมื่อ : 08 ม.ค. 51  

ความเห็นที่ : 6 แจ้งลบ  
น่าจะเอามาประยุกต์ใช้กับปฏิทินกิจกรรมนะครับ เขียนให้ทราบด้วยนะครับ คือว่ามีการเพิ่มกิจกรรมลงไปในฐาน แล้วปฏิทินจะเห็นวันทีมีกิจกรรม พอเมาส์คลิ๊กวันที่มีกิจกรรม จะแสดง Popup Window ขึ้นมาว่า วันทีนี้ - วันที่นั้น มีกิจกรรมอะไรบ้าง ????
โดย : pukmtec@hotmail.con    เมื่อ : 06 ม.ค. 51  

ความเห็นที่ : 5 แจ้งลบ  
ขอบคุณ คุณjarfang ที่สุด
โดย : mu    เมื่อ : 31 ธ.ค. 50  

ความเห็นที่ : 4 แจ้งลบ  
ตอบ คห3.ในสคริปด้านบนตรงตัวแปร $passwd มันผิดน่ะครับ ให้เปลี่ยน เป็น $password ก็ไม่มีปัญหาละครับ
โดย : jarfang    เมื่อ : 31 ธ.ค. 50  

ความเห็นที่ : 3 แจ้งลบ  
มันเป็นยังเนี้ยะ ที่ sample.php, sample2.php Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\AppServ\www\um\sample.php on line 7 Not Connection Mysql
โดย : mu    เมื่อ : 30 ธ.ค. 50  

ความเห็นที่ : 2 แจ้งลบ  
สร้างฐานข้อมูลใน localhost ชื่อ datatest ตารางชื่อ diary ส่วนตัวอื่นคือ fields ของแต่ละแถวครับ
โดย : um    เมื่อ : 30 ธ.ค. 50  

ความเห็นที่ : 1 แจ้งลบ  
มะเข้าใจตรงนี้อ่าครับผู้รู้ช่วยอธิบายหน่อยนะครับ CREATE TABLE `diary` ( `id` INT( 2 ) NOT NULL AUTO_INCREMENT , `date` VARCHAR( 10 ) NOT NULL , `subject` VARCHAR( 50 ) NOT NULL , `detail` TEXT NOT NULL , PRIMARY KEY ( `id` ) ); ผมติดตรงที่ว่ามันอ่านยังไงอะครับ
โดย : ช่วยผมน๊า    เมื่อ : 29 ธ.ค. 50  

แสดงความคิดเห็น
 
  ( JPG, GIF ) ไม่เกิน 50 k
ชื่อผู้แสดงความคิดเห็น
รหัสส่งข้อมูล

 
  Shortcut : http://www.webthaidd.com/php Back to the top   
หน้าแรกเว็บไทยดีดี บทความ PHP ข่าว PHP เว็บบอร์ด ลงโฆษณากับเรา
เพื่อนบ้านเว็บไทยดีดี ติดต่อแลกลิงค์ได้ที่ webmasterwebthaidd.com
บทความ : Mac2hand | PHP.deeserver | 3d-create | Cg4d | Thairetouch | PHPThailand | MIndphp | Icphysics | blog.ubu-design | ubu-design | pichate1964
รวมของฟรี : Websocietysite | ThaiEarth | PHPScriptHost | Narongrit.net
สถิติเว็บไซต์ : Truehits | Stat08
หางาน ออนไลน์ : JobURL | Oxfordbc | Excellent-search| jobMini
ร้านค้าออนไลน์ : Dollydolls | Gemparty | shoplanla
ข่าว และการสื่อสาร : Thainn
คอมพิวเตอร์
: Mustcomp | Com-th | Nanosoft | Thaiwirelesslan | 3D-Dsign | Changsomcom | Ccsparts | ManiaGrap | Scanidea
เว็บรุ่น : Comsci60
วาไรตี้ : Cosmodesktop | Nachiengmai | Seesan | Tteen | Baanjomyut | Thaihotweb | UnlimitLife | Zazana
การเกษตร และสิ่งแวดล้อม : Orchidsiam
เพลง ดนตรี
: Tapeburapa
สุขภาพ : Thai-sle | healthy-dee
ทองเที่ยว : Tourmuangthai | Ezytrip | Elephantpark | Ekohchang | Lantalanta | Silkzpider | Silverstonetour | Varietykorea | Varietytrip | Thailand Hotels
โรงแรม รีสอร์ท : Vacationvillage | kohmook-resort | บ้านคุณตา
ผู้พิทักษ์สันติราษฎร์ : สำนักงานตำรวจแห่งชาติ | สถานีตำรวจภูธรอำเภอผักไห่ | สถานีตำรวจภูธรอำเภอเคียนซา
ทั่วไป
: Thailand | Maxpromarket | Pyayam
© 2005-2010 WebThaiDD.COM All rights reserved. แนะนำ ติ-ชม  webmaster@webthaidd.com เลขทะเบียนพาณิชย์ 0105549132957