PHPページがあり、送信ボタンをクリックすると、いくつかのMySQLクエリが処理されます。
MySQL PHPMyAdminでは、クエリは100%動作し、両方のクエリが実行されます。しかし、私のPHPコードでは、クエリは実行されません。
どんな助けでもありがたいです、私はこれがまともなPHPコーダーのための単純なものであるに違いありません。
ライアンに感謝します。
私のコードは次のとおりです。
<?php
mysql_connect("localhost", "hulamin_hulamin", "Hulamin2011")or die("cannot connect");
mysql_select_db("hulamin_loc")or die("cannot select DB");
$sql="SELECT `dispatcharea`,`customer`,`casenumber`,`weight` from loaddetails where loadid = 0 order by dispatcharea";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
?>
<html>
<head>
<title>
Plan Local PMB Delivery - Step 2
</title>
</head>
<html>
<table border=0>
<tr>
<td>
<form name="form1" method="post">
<table border=1>
<tr>
<td width=150>Dispatch Area</td>
<td width=300>Customer</td>
<td width=150>Case Number</td>
<td width=100>Weight</td>
</tr>
<?php
while($rows=mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $rows['dispatcharea']; ?></td>
<td><?php echo $rows['customer']; ?></td>
<td><?php echo $rows['casenumber']; ?></td>
<td><?php echo $rows['weight']; ?></td>
</tr>
<?php
}
?>
</table>
<input name="Next" type="submit" id="Next" value="Next">
<?php
if($_REQUEST['Next']=='Next') {
{
$sql="update loaddetails set loadid= (select max(loadid)+1 from loadcounterid) where loadid=0; update loadcounterid set loadid= (select max(loadid) from loaddetails) where loadid>0;";
$final=mysql_query($sql);
if($final)
{
echo "<meta http-equiv=\"refresh\" content=\"0;URL=planlocalpmbstep3.php\">";
}
}
}
?>
</table>
</form>
</td>
</tr>
</table>
もう一度ありがとう、ライアン