<? mysql_connect("localhost","root","1111") or die(mysql_error()); mysql_select_db("newproject"); ?> <script type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </head> <body> <form action="show_ready.php" method="post" name="frmMain"> รายการโปรเจค <select name="lmName1" OnChange="window.location='?item='+this.value;"> <option value=""><-- Please Select Item --></option> <? $strSQL = "SELECT * FROM project ORDER BY id_project ASC"; $objQuery = mysql_query($strSQL); while($objResult = mysql_fetch_array($objQuery)) { if($_GET["item"] == $objResult["id_project"]) { $sel = "selected"; } else { $sel = ""; } ?> <option value="<?=$objResult["id_project"];?>" <?=$sel;?>><?=$objResult["id_project"];?></option> <? } ?> </select> <? if($_GET["item"] != "") { $strSQL = "SELECT * FROM project WHERE id_project = '".$_GET["item"]."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); } ?> <input type="hidden" name="hdnLine" value="<?=$objResult2["Nproject"];?>"> <input type="hidden" name="hdnLine2" value="<?=$objResult2["year"];?>"> <input type="hidden" name="hdnLine3" value="<?=$objResult2["priceLM"];?>"> <input type="hidden" name="hdnLine4" value="<?=$objResult2["Norg"];?>"> <? if($_GET["item"] != "") { $strSQL = "SELECT company.Ncompany, product.Nproduct From present, product, company WHERE company.id_company = present.id_company AND product.id_product = present.id_product and present.id_project = '".$_GET['item']."' "; $objQuery = mysql_query($strSQL); $objResult2 = mysql_fetch_array($objQuery); $num_rows = mysql_num_rows($objQuery); } ?> <input type="hidden" name="hdnLine5" value="<?=$objResult3["Nproduct"];?>"> <input type="hidden" name="hdnLine6" value="<?=$objResult3["Ncompany"];?>"> <? echo $objResult2["Ncompany"]; /* ลองเอคโค่ข้อมูลออกมาดู ก็มีข้อมูลอยู่ครับ */ ?> <label> <input type="submit" name="Submit" value="เลือก" /> </label> </form> </body> </html> <? mysql_close(); ?>
<? mysql_connect("localhost","root","1111") or die (mysql_error()); mysql_select_db("newproject"); mysql_query("set names utf8"); mysql_query("SET character_set_results=utf8"); mysql_query("SET character_set_client=utf8"); mysql_query("SET character_set_connection=utf8"); ?> <body> <table width="577" border="1" align="center"> <tr> <th colspan="4" scope="row"> <? echo $_POST["hdnLine"]; ?> </th> </tr> <tr> <th colspan="3" scope="row">งบประมาณรายจ่ายประจำปีงบประมาณ</th> <td width="144"> <? if($_POST["hdnLine2"]=="1" ) {echo "พ.ศ.2555";} else if ($_POST["hdnLine2"]=="2") {echo "พ.ศ.2554";} ?> </tr> <tr> <th width="156" scope="row">วงเงิน</th> <th width="117" scope="row"> <? echo $_POST["hdnLine3"]; ?> </th> <th colspan="2" scope="row"> <? echo $_POST["hdnLine4"]; ?> </th> </tr> </table> <p> </p> <form id="form1" name="form1" method="post" action=""> <table width="783" border="1" align="center"> ///////////////////////////////ในส่วนนี้ข้อมูลโชว์ เรียบร้อยแล้วครับ//////////////////////////////////////// <tr> <th width="56" scope="row"><div align="center" class="style1"> ลำดับ</div></th> <td width="313"><div align="center" class="style1"> รายการ</div></td> <td colspan="3"><div align="center" class="style1"> เปรียบเทียบ 3 รายการ </div></td> <td width="85"><div align="center" class="style1"> ราคาจัดหา</div></td> </tr> <tr> <th rowspan="2" scope="row"> </th> <td rowspan="2"><? echo $_POST["hdnLine5"]; /*ข้อมูลไม่ยอมส่งมาคับ*/ ?></td> <td><? echo $_POST["hdnLine6"]; ?></td> <td> </td> <td> </td> <td rowspan="2"> </td> </tr> <tr> <td width="100"> </td> <td width="100"> </td> <td width="100"> </td> </tr> </table> </form> <p> </p> </body> </html> <? mysql_close(); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง