0
我懷疑如何在鏈接中獲取兩個值並將其傳遞給編輯函數。幫助請.......php鏈接參數
以下是代碼,
兩個我都想要ManufactureDate可以和產品代碼,傳遞給獲得[EDI],
<td > <a name="edit" href="productwarrantymaster.php?edi[]=<? echo $record['ProductCode']; echo $record['ManufactureDate'];?>">Edit</a></td>
以下是代碼爲編輯功能,
if(!empty($_GET['edi']))
{
$prmaster =$_GET['edi'];
$Manufactu =$_GET['edi'];
$result=mysql_query("SELECT * FROM productwarranty where ProductCode ='".$prmaster."' and ManufactureDate ='".$Manufactu."'");
$myrow1 = mysql_num_rows($result);//mysql_fetch_array($retval);
if($myrow1==0)
{
?>
<script type="text/javascript">
alert("No Data Found!!");
</script>
<?
}
else
{
$myrow = mysql_fetch_array($result);
$ProductCode = $myrow['ProductCode'];
$WarrantyPeriod = $myrow['WarrantyPeriod'];
$ProRataPeriod = $myrow['ProRataPeriod'];
$ManufactureDate = $myrow['ManufactureDate'];
$ApplicableFormDate = $myrow['ApplicableFormDate'];
}
$prmaster = NULL;
}
我該如何將此函數傳遞給edi函數? –
替換這個代碼它應該工作 –
像LearneR說的,替換代碼,它應該工作! – Chris