|
 |
|
สอบถามเรื่องตัวแปรในลูปครับ มันส่งแต่ค่าสุดท้าย ทั้งที่มันแสดงข้อมูลครบ |
|
 |
|
|
 |
 |
|
Code (PHP)
<?php
ob_start();
?>
<!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>
<link type="text/css" rel="stylesheet" href="css/tabmenu2.css" />
</head>
<body><div align="center">
<form name="frmMain" method="post" action="">
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr class="text7">
<td width="150" align="center">วัน-เวลา</td>
<td width="150" align="center">ทีมเหย้า</td>
<td width="50" align="center"> </td>
<td width="150" align="center">ทีมเยือน</td>
<td width="150" align="center"> </td>
</tr>
<tr>
<?
include("connectdb.php");
$strSQL = "SELECT * FROM `match` ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$intRows = 0;
while($objResult = mysql_fetch_array($objQuery))
{
$intRows++;
?>
<td align="center" class="text2">
<input type="hidden" name="matchid" value="<?=$objResult["matchid"];?>" /><?=$objResult["matchtime"];?> : <?=$objResult["matchdate"];?>
</td>
<td align="center" class="text8">
<?
$homenameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["homeid"]."'";
$homenameQuery = mysql_query($homenameSQL);
$homenameResult = mysql_fetch_array($homenameQuery);
?>
<?=$homenameResult["teamname"];?>
</td>
<td align="center" class="text5">
VS</td>
<td align="center" class="text5">
<?
$guestnameSQL = "SELECT * FROM `team` WHERE teamid = '".$objResult["guestid"]."'";
$guestnameQuery = mysql_query($guestnameSQL);
$guestnameResult = mysql_fetch_array($guestnameQuery);
?>
<?=$guestnameResult["teamname"];?></span>
</td>
<td align="center" class="text5">
<script language="JavaScript">
function windowOpen(matchid) {
var myWindow=window.open('seat.php?&matchid='+matchid,'windowRef','width=300,height=200');
if (!myWindow.opener) myWindow.opener = self;
}
</script>
<span class="text5" id="openPopup" onClick="Javascript:windowOpen('<?=$objResult["matchid"];?>');" value="Get Value">จองตั๋ว</span></td>
</tr>
<?
}
?>
</table>
</form>
ลองดูครับได้หรือเปล่า
|
 |
 |
 |
 |
Date :
2012-08-18 00:27:14 |
By :
tongkamlekdee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้แล้วครับ ขอบคุณหลายๆครับ
ถ้าหากเราจะส่งค่าหลายตัวล่ะครับ ต้องเพิ่มตรง
Code (PHP)
var myWindow=window.open('seat.php?&matchid='+matchid
ใช่รึเปล่าครับ
|
 |
 |
 |
 |
Date :
2012-08-18 01:31:22 |
By :
jokerark |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|