|
|
|
ต้องการนำค่าที่เลือกจาก dropdrown list ส่งค่าไป page อื่น ต้องเขียน code อย่างไรค่ะ |
|
|
|
|
|
|
|
Code (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=windows-874" />
<title>Untitled Document</title>
</head>
<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>
<body>
<?
include ("mysql_connect.php");?>
<?
$strSQL = "SELECT * FROM operator";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<form id="form1" method="get" action="fee_mounth.php">
<div align="center">
<p><br />
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<?
while($objResult = mysql_fetch_array($objQuery))
{
?>
<option value="page.php?select=<?=$objResult["id"];?>">
<?=$objResult["thainame"];?>
</option>
<?
}
?>
</select>
</p>
<p> </p>
<p>
<label> </label>
<label>
<input type="submit" name="button" id="button" value="Submit" />
</label>
<br />
</p>
<p></p>
</div>
</form>
</body>
</html>
</body>
</html>
ผมยังไม่ได้ Test นะลองรันดูครับว่าได้มั้ย
|
|
|
|
|
Date :
2009-12-06 16:30:45 |
By :
panyapol |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณค่ะ จะลองทำดูค่ะ
|
|
|
|
|
Date :
2009-12-06 16:32:33 |
By :
garfieldgril |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้ไม่ได้บอกด้วยนะครับ
|
|
|
|
|
Date :
2009-12-06 16:33:45 |
By :
panyapol |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้แล้วค่ะขอบคุณมากค่ะ
แต่ว่าหน้าที่รับค่าจะเขียน รับค่าที่ส่งยังงัยค่ะ
|
|
|
|
|
Date :
2009-12-06 16:57:43 |
By :
garfieldgril |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|