我怀疑如何在链接中获取两个值并将其传递给编辑函数。请帮助......
以下是代码,
我希望将制造品和产品代码都传递给 get[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;
}