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 > ช่วยเช็คให้ทีน่ะคับ ว่าทำไมผมส่งค่าในดรอปดาว ไม่ไปอีกหน้า



 

ช่วยเช็คให้ทีน่ะคับ ว่าทำไมผมส่งค่าในดรอปดาว ไม่ไปอีกหน้า

 



Topic : 108390

Guest




Code (PHP)
<? include ('connect.php'); ?>
<!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=utf-8" />
<title>Untitled Document</title>
<center>
<style type="text/css" align="center">
body,td,th {
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 14px;
}
body {
	background-color: #FFFFFF;
}
</style>
</head>

<center>
<body>
<?
	$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");  
	$thai_month_arr=array(  
		"0"=>"",  
		"1"=>"ม.ค. " ,
		"2"=>"ก.พ. ",  
		"3"=>"มี.ค. ",  
		"4"=>"เม.ย. ",  
		"5"=>"พ.ค. ",  
		"6"=>"มิ.ย. ",   
		"7"=>"ก.ค. ",  
		"8"=>"ส.ค. ",  
		"9"=>"ก.ย. ",  
		"10"=>"ต.ค. ",  
		"11"=>"พ.ย. ",  
		"12"=>"ธ.ค. "          
		);  
	function thai_date($time){  
		$eng_date=strtotime($time);
		global $thai_day_arr,$thai_month_arr;  
		//$thai_date_return="วัน".$thai_day_arr[date("w",$time)];  
		$thai_date_return.= date("j ",$eng_date);  
		$thai_date_return.=$thai_month_arr[date("n",$eng_date)];  
		$thai_date_return.= (date(" Yํ",$eng_date)+543-2500);  
		//$thai_date_return.= "  ".date("H:i",$time)." น.";  
    return $thai_date_return;  
	}
?>
<table height="55" width="600" cellpadding="0" cellspacing="0" border="0">
<form id="form1" name="form1" method="post" action="find_commission1.php">
  <tr>
    <td align="right" bgcolor="#99CCFF"><label><strong>รหัสพนักงาน </strong></label></td>
    <td bgcolor="#99CCFF"><input type="text" name="txtKeyword" id="name" /></td>
    
    <td bgcolor="#99CCFF" align="right"><label><strong>ชื่อพนักงาน </strong></label></td>
    <td bgcolor="#99CCFF" align="left"><input type="text" name="txtKeyword1" id="name1" /></td>
    
    
    
    <td colspan="2" align="center" bgcolor="#99CCFF"><input type="submit" name="btnSearch" id="btnSearch" value="ค้นหา" />&nbsp;<input type="reset" name="btnreset" id="btnreset" value="ล้าง" /></td>
    </tr>
    </form>
</table>

           
<tr>
<br>
<?

$strSQL = "SELECT car_reserve.reserve_id, car_reserve.emp_id, employee.emp_name, employee.emp_lname, car_reserve.date_regisred, car_reserve.date_cus_receive, employee.jobs
FROM car_reserve, employee ";
$strSQL .= "WHERE  car_reserve.emp_id = employee.emp_id AND employee.jobs = 'พนักงานขาย'
GROUP BY employee.emp_id " ;
//echo $strSQL;
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>


<form id="form2" name="form2" method="post" action="commis.php">
<table   width="600" border="1" cellpadding="1" cellspacing="1" align="center">
  <tr bgcolor="#99CCFF">
    <th height="30" align="center">รหัสพนักงาน</th>
    <th height="30" align="center">ชื่อ-นามสกุลพนักงาน</th>
    <th height="30" align="center">ตำแหน่ง</th>
    <th height="30" align="center">เลือก</th>
    <th height="30" align="center">เลือก</th>
  </tr>
<?

while($objResult = mysql_fetch_array($objQuery))
{
?>
  <tr>
    <td height="25" align="center"><? echo $objResult["emp_id"]; ?></td>
    <td align="left">&nbsp; <?=$objResult["emp_name"];?>&nbsp;<?=$objResult["emp_lname"];?></td>
    <td align="center">&nbsp; <?=$objResult["jobs"];?></td>
    <td align="center">
  <select name="month" id="month">
  <option value="">--- เดือน ---</option>
  <option value="01">มกราคม</option>
  <option value="02">กุมภาพันธ์</option>
  <option value="03">มีนาคม</option>
  <option value="04">เมษายน</option>
  <option value="05">พฤษภาคม</option>
  <option value="06">มิถุนายน</option>
  <option value="07">กรกฎาคม</option>
  <option value="08">สิงหาคม</option>
  <option value="09">กันยายน</option>
  <option value="10">ตุลาคม</option>
  <option value="11">พฤศจิกายน</option>
  <option value="12">ธันวาคม</option>
  </select>

  <select name="year" id="year">
  <option value=" ">-- ปี --</option>
  <?PHP for($i=0; $i<=50; $i++) {?>
  <option value="1"><?PHP echo date("Y")-$i+543?></option>
  <?PHP }?>
  </select></td>
    <td align="center"><a href="commis.php?emp_id=<? echo $objResult["emp_id"]; ?>" onclick="window.open(this.href,'child','height=600,width=500') ; return false">
<input type="button" name="recive" value="ดูค่าคอมมิชชั่น" /></a></td>
  </tr>
<?
}
?>
</table>
</form>
</body>
</center>
</html>


จะให้ส่งค่าไปไปอีกหน้าอ่ะคับ

<!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=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-color: #FFF;
}
</style>
<?
	$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");  
	$thai_month_arr=array(  
		"0"=>"",  
		"1"=>"ม.ค. " ,
		"2"=>"ก.พ. ",  
		"3"=>"มี.ค. ",  
		"4"=>"เม.ย. ",  
		"5"=>"พ.ค. ",  
		"6"=>"มิ.ย. ",   
		"7"=>"ก.ค. ",  
		"8"=>"ส.ค. ",  
		"9"=>"ก.ย. ",  
		"10"=>"ต.ค. ",  
		"11"=>"พ.ย. ",  
		"12"=>"ธ.ค. "          
		);  
	function thai_date($time){  
		$eng_date=strtotime($time);
		global $thai_day_arr,$thai_month_arr;  
		//$thai_date_return="วัน".$thai_day_arr[date("w",$time)];  
		$thai_date_return.= date("j ",$eng_date);  
		$thai_date_return.=$thai_month_arr[date("n",$eng_date)];  
		$thai_date_return.= (date(" Yํ",$eng_date)+543-2500);  
		//$thai_date_return.= "  ".date("H:i",$time)." น.";  
    return $thai_date_return;  
	}
?>
</head>
<body>
<p>
<? include ('connect.php');
$month = $_REQUEST["month"];
$year = $_REQUEST["year"]; 
$emp_id = $_REQUEST["emp_id"];
echo $month ;
$sql="SELECT * 
FROM commission 
WHERE emp_id ='$emp_id'
AND month = '$month'
AND year = '$year' 
ORDER BY date_com ";
$record=mysql_query($sql) or die(mysql_error());

echo $sql ;
$sql1="SELECT * FROM employee WHERE emp_id ='$emp_id' ";
$record1=mysql_query($sql1) or die(mysql_error());
$data1 = mysql_fetch_assoc($record1);


?><p></p>
<center>
<table width="450" border="0">
  <tr>
    <th width="119" height="30" colspan="4" align="left"><? echo $data1['emp_id'];?> : <? echo $data1['emp_name'];?>&nbsp;<? echo $data1['emp_lname'];?></th>
  </tr>
</table>

<table width="450" cellpadding="1" cellspacing="1" border="1">
  <tr>
    <th width="120" height="30" bgcolor="#99CCFF">วันที่คิดค่าคอม</th>
    <th width="76" bgcolor="#99CCFF">จำนวนรถ</th>
    <th width="125" bgcolor="#99CCFF">ได้ค่าคอมคันละ</th>
    <th width="106" bgcolor="#99CCFF">ค่าคอมมิชชั่น</th>
  </tr>
  <?php while($data=mysql_fetch_assoc($record)){ ?>
  <tr>
    <td align="center" height="25"><? if($data['date_com']=='0000-00-00')
	echo "-";
	else
	echo thai_date($data['date_com']);?></td>
    <td align="center"><? echo $data['amount']?></td>
    <td align="center">2500</td>
    <td align="right"><? echo number_format (($data['amount']*2500),2) ?></td>
  </tr>
  <tr>
  <? number_format (($sum = $sum + $data['amount']*2500),2) ?>
    <? $s[$i]=($data['amount'])+$s[$i] ; ?>
  <? } ?>

    <th height="25" colspan="4" align="center" bgcolor="#99CCFF">รวมค่าคอมมิชชั่น เดือน <? echo $data2['month']?>
      ปี <? echo $data2['year']?></th>
    </tr>
  <tr>
    <td height="25" colspan="3" align="right">รวมจำนวนรถ <? echo $s[$i] ?> คัน&nbsp;</td>
    <td align="right"><? echo number_format($sum ,2) ?></td>
  </tr>
</table>

</center>
</body>
</html>




Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-05-15 20:20:08 By : smile View : 600 Reply : 3
 

 

No. 1



โพสกระทู้ ( 1,994 )
บทความ ( 10 )



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

จะส่งไปหน้าไหน?






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-05-15 21:08:16 By : {Cyberman}
 


 

No. 2



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

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

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

เอาเฉพาะ Code ที่ตรงปัญหาครับ จะได้ไม่เป็นขยะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-05-16 08:53:52 By : mr.win
 

 

No. 3



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



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


Code (PHP)
print_r($_REQUEST);


ใส่ code นี้ในหน้าที่จะส่งค่าไปน่ะครับ แล้วลองดูว่า มันมี ค่านั้นหรือไหม
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-05-21 12:12:18 By : nut_ch31
 

   

ค้นหาข้อมูล


   
 

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