elyas_delshadnbe
دوشنبه 12 اسفند 1392, 03:12 صبح
فوووووووووووووووووووووری. ا سلام.من در حال نوشتن یه وب سایته دارویی هستم واسه پروزم.یه صفحه هست به نام sabtesefaresh.php که بعد از ثبت شما رو به صفحه SbtF.php هدایت میکنه.ولی نمیدونم چرا وقتی وارد SbtF.php میشه یا یه همچی اروری مواجه میشم.کدهای این دو صفحه با ارورشو میذارم.
این کد sabtesefaresh.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php session_start();?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>ثبت سفارش</title><script type="text/javascript" src="Scripts/jquery.min.js"></script><script type="text/javascript">function Chekvalidation(){
var ShomareChek=document.forms["sss"]["Tedad[]"].value;if (ShomareChek==null || ShomareChek=="") { alert("فیلد تعداد نباید خالی باشد"); return false; } }</script><style type="text/css">
body{background-image:url('Images/background.jpg');margin:120px;
}/*******************منوی بالا**********************/.MenueBala{width:81%;height: 130px; margin-top:-100px; margin-left:116px; background:#000000; }
.Image1{width:130px;height:130px;margin-top:0px;margin-left:40px;float:left;
}.Image2{width:120px;margin-top:10px;margin-left:-10px; height:120px; float:left;
}
.panel1{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:775px;margin-top:62px;transition-duration: 5s;-webkit-transition-duration: 5s;
/*-webkit-transform:rotate(15deg); -moz-transform:rotate(15deg); -o-transform:rotate(15deg); -ms-transform:rotate(15deg);*/
} .panel2{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:687px;margin-top:-52px;
} .panel3{
background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:599px;margin-top:-52px;
} .panel4{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:511px;margin-top:-52px;
}.panel5{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:423px;margin-top:-52px;margin-right:20px; }/*******************منوی پایین**********************/.SafhePaeen1{width:500px;height:420px;background-color: #FFFFFF;margin-left:200px;margin-top:-30px/*-webkit-box-shadow: inset 0 0 20px 1px #ccf;
box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;*/
}
.MenuePaeen{width:200px;height:169px;margin-top:60px;margin-left:800px;background-color: #1E1E1E;
webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666; border-radius: 20px 20px 20px 20px;
}.Ppaeen{width:150px;height:27px;background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666; margin-bottom:0px; margin-top:-12px;
}.p1{width:150px;height:30px;margin-top:10px;/*background-color:#CC3300;*/background-color:#333333; margin-bottom:5px; margin-top:10px; -webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;
}.p2{width:150px;height:10px;background-color:#FFFFCC;/*#CC3300*/margin-bottom:-24px;margin-top:10px
}.text{ font-family:"Comic Sans MS", cursive; font-size:17px; /*float:right;*/ direction:rtl; text-decoration:none; text-align:center; text-transform:capitalize; z-index:1000px; text-shadow:2px 2px 2px #666; color:white; }
.pdetails{text-align:center; color:white; text-decoration:none;
}table{ counter-increment:inherit; border:medium;border-color:green; }
input{ width:80px; } td{width:80px; }
div#submitForm input {/* background: url('4.jpg') no-repeat scroll 0 0 transparent;*/background:url('images (1).jpg')repeat-y aqua;
/* color: #000000; cursor: pointer; font-weight: bold; height: 20px; padding-bottom: 2px;*/ width:55px;}
</style>
</head>
<body>
<! -------------------------------------------------------------------------- عکس ها>
<div class="MenueBala" ><div> <img src="Images/1.jpg" alt=" daro" class="Image1" /><img src="Images/2.jpg" alt=" da" class="Image2" /></div></div><! -------------------------------------------------------------------------- منوی بالا>
<div style="margin-top:-100px ;margin-left:150px "><div class="panel1"><p class="text"><a class="pdetails" href="Index.php">صفحه اصلی</a></p></div><div class="panel2"><p class="text"><a class="pdetails" href="DarbareyeMa.php">درباره ما</a></p></div><div class="panel3"><p class="text"><a class="pdetails" href="Mahsoulat.php">محصولات</a></p></div><div class="panel4"><p class="text"><a class="pdetails" href="MarakezeTozi.php">مراکز توزیع</a></p></div><div class="panel5"><p class="text"><a class="pdetails" href="ErtebatBaMa.php">ارتباط با ما</a></p></div>
</div>
<! -------------------------------------------------------------------------- منوی پایین>
<div class="MenuePaeen">
</div><div style="width:150px;height:35px;margin-top:-145px;margin-left:825px">
<div class="p2"></div><div class="p1"><p class="text" style="font-size:19px" ><a class="pdetails" href="#"></a>پرتال مشتریان </p></div>
<div class="Ppaeen"><p class="text"> <a class="pdetails" href="Sefaresh.php"> ثبت سفارش </a></p></div><div class="Ppaeen"><p class="text"><a class="pdetails" href="Moshahede_b.php"> مشاهده سفارشات </a></p></div><a href="Logout.php?username=$username" style="color:red;font-size:16px; text-decoration: blink;"> خروج</a></div>
<?php$CodeMoshtari=$_REQUEST['CodeMoshtari'];
$_REQUEST['checkbox'];$con=mysqli_connect("localhost","root","","daroopakhsh");
// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$con->set_charset("utf8");
echo '<div class="SafhePaeen1">' ;
echo '<div align="center" style="width:500px;height:400px;background-color:white;overflow:scroll" >';
?> <form action="SbtF.php" metod="post" name="sss" ><?phpecho " <table> ";
echo '<tr><th bgcolor="#00CCFF" width="80px">تعداد</th><th bgcolor="#00CCFF" width="80px">سقف سفارش</th><th bgcolor="#00CCFF" width="80px"> قیمت</th>
<th bgcolor="#00CCFF" width="80px"> نام کالا</th>
</tr>';
foreach($_REQUEST['checkbox'] as $i){$Sel=$i; $result=mysqli_query($con,"Select * FROM `Kala` WHERE CodeKala='".$Sel."'"); if(!$result)die('no result'); $row = $result->fetch_object() ;
$CodeKala=$row->CodeKala;
$NameKala=$row->NameKala; $SaghfeSefaresh=$row->SaghfeSefaresh; $Gheimat=$row->Gheimat; $Mojoodi=$row->Mojoodi;
echo"<table><tr><td></td>";
echo " <td><input type='text' name='Tedad[]' ></td>"; echo '<td><input type="text" name="SaghfeSefaresh[]" readonly="readonly" style="text-align:right" value="'.$SaghfeSefaresh.'" ></td>'; echo"<td><input type='text' name=Gheimat[] value=$Gheimat readonly='readonly' ></td>";
echo '<td><input type="text" name="NameKala[]" readonly="readonly" style="text-align:right" value="'.$NameKala.'" ></td>'; echo "<td> <input type='hidden' name='CodeKala[]' readonly='readonly' value=$CodeKala ></td></tr></table>";
echo" <input type='hidden' name=Mojoodi[] value=$Mojoodi readonly='readonly' >"; } echo"<input type='hidden' name=CodeMoshtari value=$CodeMoshtari />";
echo "<input type='submit' name='sabt' value='ثبت' id='sabt'/></form>";
echo"</div>";echo"</div>";
?><input type="hidden" style="text-align:right" readonly="readonly"/>
اینم کد SbtF.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 content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>ثبت فروش</title><script type="text/javascript" src="Scripts/jquery.js"></script>
</head>
<body><?phpvar_dump($_REQUEST);
$CodeMoshtari=$_REQUEST['CodeMoshtari'];var_dump($_REQUEST['CodeMoshtari']);
$CodeKala=$_REQUEST['CodeKala'];
$Tedad=$_REQUEST['Tedad'];var_dump($_REQUEST['Tedad']);
$Mojoodi=$_REQUEST['Mojoodi'];var_dump($_REQUEST['Mojoodi']);
$Gheimat=$_REQUEST['Gheimat'];var_dump($_REQUEST['Gheimat']);
$SaghfeSefaresh=$_REQUEST['SaghfeSefaresh'];var_dump($_REQUEST['SaghfeSefaresh']);
include 'DateTime.php';$Shamsi = jdate('Y-m-d','','','','en');var_dump($Shamsi);
$con=mysqli_connect("localhost","root","","daroopakhsh");
// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$con->set_charset("utf8");
$result=mysqli_query($con,"SELECT ShomareFaktor FROM faktor ORDER BY ShomareFaktor DESC LIMIT 1");if(!$result)die('not select ShomareFaktor');$row = mysqli_fetch_array($result);$SF=$row['ShomareFaktor']+1;var_dump($SF);
$i=0;foreach($CodeKala as $Ck){$i++; $n=$i;
}$Mablagh=0; $Jam=0;$i=0;while($i<$n){$Ss=$SaghfeSefaresh[$i];$Mj=$Mojoodi[$i];$Gm=$Gheimat[$i];$Ck=$CodeKala[$i];$Td=$Tedad[$i];
if($Td!='' && $Td!=0 ){if($Td<$Mj && $Td<$Ss){
$Jam=$Td*$Gm;
$Mj=$Mj-$Td;
$result=mysqli_query($con," UPDATE kala set Mojoodi='".$Mj."' WHERE CodeKala='".$Ck."'"); if(!$result)die('no result update mojoodi');
$result=mysqli_query($con,"INSERT INTO Sefaresh (CodeKala,Tedad,ShomareFaktor)VALUES ('$Ck','$Td','$SF')") ; if(!$result)die('no Insert to sefaresh'); else echo'hiiiiiiii';
}$i++;$Mablagh=$Jam+$Mablagh;
}
var_dump($Mablagh);
$result=mysqli_query($con,"INSERT INTO Faktor (Mablagh,Tarikh,CodeMoshtari)VALUES ('$Mablagh','$Shamsi','$CodeMoshtari')") ; if(!$result)die('no Insert to Faktor');
}/*$Mj=$Mj-$Td;$result=mysqli_query($con," UPDATE kala set Mojoodi='".$Mj."' WHERE CodeKala='".$Ck."'"); if(!$result)die('no result update mojoodi'); */header('LOCATION:./Moshahede_b.php');
?></body>
</html>
این کد sabtesefaresh.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php session_start();?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>ثبت سفارش</title><script type="text/javascript" src="Scripts/jquery.min.js"></script><script type="text/javascript">function Chekvalidation(){
var ShomareChek=document.forms["sss"]["Tedad[]"].value;if (ShomareChek==null || ShomareChek=="") { alert("فیلد تعداد نباید خالی باشد"); return false; } }</script><style type="text/css">
body{background-image:url('Images/background.jpg');margin:120px;
}/*******************منوی بالا**********************/.MenueBala{width:81%;height: 130px; margin-top:-100px; margin-left:116px; background:#000000; }
.Image1{width:130px;height:130px;margin-top:0px;margin-left:40px;float:left;
}.Image2{width:120px;margin-top:10px;margin-left:-10px; height:120px; float:left;
}
.panel1{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:775px;margin-top:62px;transition-duration: 5s;-webkit-transition-duration: 5s;
/*-webkit-transform:rotate(15deg); -moz-transform:rotate(15deg); -o-transform:rotate(15deg); -ms-transform:rotate(15deg);*/
} .panel2{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:687px;margin-top:-52px;
} .panel3{
background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:599px;margin-top:-52px;
} .panel4{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:511px;margin-top:-52px;
}.panel5{background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;width:85px;height:35px;margin-left:423px;margin-top:-52px;margin-right:20px; }/*******************منوی پایین**********************/.SafhePaeen1{width:500px;height:420px;background-color: #FFFFFF;margin-left:200px;margin-top:-30px/*-webkit-box-shadow: inset 0 0 20px 1px #ccf;
box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;*/
}
.MenuePaeen{width:200px;height:169px;margin-top:60px;margin-left:800px;background-color: #1E1E1E;
webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666; border-radius: 20px 20px 20px 20px;
}.Ppaeen{width:150px;height:27px;background-color:#157784;
-webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666; margin-bottom:0px; margin-top:-12px;
}.p1{width:150px;height:30px;margin-top:10px;/*background-color:#CC3300;*/background-color:#333333; margin-bottom:5px; margin-top:10px; -webkit-box-shadow: inset 0 0 20px 1px #ccf; box-shadow: inset 0 0 20px 1px #ccf; -moz-box-shadow: inset 0 0 20px 1px #ccf; text-shadow:2px 2px 2px #666;
}.p2{width:150px;height:10px;background-color:#FFFFCC;/*#CC3300*/margin-bottom:-24px;margin-top:10px
}.text{ font-family:"Comic Sans MS", cursive; font-size:17px; /*float:right;*/ direction:rtl; text-decoration:none; text-align:center; text-transform:capitalize; z-index:1000px; text-shadow:2px 2px 2px #666; color:white; }
.pdetails{text-align:center; color:white; text-decoration:none;
}table{ counter-increment:inherit; border:medium;border-color:green; }
input{ width:80px; } td{width:80px; }
div#submitForm input {/* background: url('4.jpg') no-repeat scroll 0 0 transparent;*/background:url('images (1).jpg')repeat-y aqua;
/* color: #000000; cursor: pointer; font-weight: bold; height: 20px; padding-bottom: 2px;*/ width:55px;}
</style>
</head>
<body>
<! -------------------------------------------------------------------------- عکس ها>
<div class="MenueBala" ><div> <img src="Images/1.jpg" alt=" daro" class="Image1" /><img src="Images/2.jpg" alt=" da" class="Image2" /></div></div><! -------------------------------------------------------------------------- منوی بالا>
<div style="margin-top:-100px ;margin-left:150px "><div class="panel1"><p class="text"><a class="pdetails" href="Index.php">صفحه اصلی</a></p></div><div class="panel2"><p class="text"><a class="pdetails" href="DarbareyeMa.php">درباره ما</a></p></div><div class="panel3"><p class="text"><a class="pdetails" href="Mahsoulat.php">محصولات</a></p></div><div class="panel4"><p class="text"><a class="pdetails" href="MarakezeTozi.php">مراکز توزیع</a></p></div><div class="panel5"><p class="text"><a class="pdetails" href="ErtebatBaMa.php">ارتباط با ما</a></p></div>
</div>
<! -------------------------------------------------------------------------- منوی پایین>
<div class="MenuePaeen">
</div><div style="width:150px;height:35px;margin-top:-145px;margin-left:825px">
<div class="p2"></div><div class="p1"><p class="text" style="font-size:19px" ><a class="pdetails" href="#"></a>پرتال مشتریان </p></div>
<div class="Ppaeen"><p class="text"> <a class="pdetails" href="Sefaresh.php"> ثبت سفارش </a></p></div><div class="Ppaeen"><p class="text"><a class="pdetails" href="Moshahede_b.php"> مشاهده سفارشات </a></p></div><a href="Logout.php?username=$username" style="color:red;font-size:16px; text-decoration: blink;"> خروج</a></div>
<?php$CodeMoshtari=$_REQUEST['CodeMoshtari'];
$_REQUEST['checkbox'];$con=mysqli_connect("localhost","root","","daroopakhsh");
// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$con->set_charset("utf8");
echo '<div class="SafhePaeen1">' ;
echo '<div align="center" style="width:500px;height:400px;background-color:white;overflow:scroll" >';
?> <form action="SbtF.php" metod="post" name="sss" ><?phpecho " <table> ";
echo '<tr><th bgcolor="#00CCFF" width="80px">تعداد</th><th bgcolor="#00CCFF" width="80px">سقف سفارش</th><th bgcolor="#00CCFF" width="80px"> قیمت</th>
<th bgcolor="#00CCFF" width="80px"> نام کالا</th>
</tr>';
foreach($_REQUEST['checkbox'] as $i){$Sel=$i; $result=mysqli_query($con,"Select * FROM `Kala` WHERE CodeKala='".$Sel."'"); if(!$result)die('no result'); $row = $result->fetch_object() ;
$CodeKala=$row->CodeKala;
$NameKala=$row->NameKala; $SaghfeSefaresh=$row->SaghfeSefaresh; $Gheimat=$row->Gheimat; $Mojoodi=$row->Mojoodi;
echo"<table><tr><td></td>";
echo " <td><input type='text' name='Tedad[]' ></td>"; echo '<td><input type="text" name="SaghfeSefaresh[]" readonly="readonly" style="text-align:right" value="'.$SaghfeSefaresh.'" ></td>'; echo"<td><input type='text' name=Gheimat[] value=$Gheimat readonly='readonly' ></td>";
echo '<td><input type="text" name="NameKala[]" readonly="readonly" style="text-align:right" value="'.$NameKala.'" ></td>'; echo "<td> <input type='hidden' name='CodeKala[]' readonly='readonly' value=$CodeKala ></td></tr></table>";
echo" <input type='hidden' name=Mojoodi[] value=$Mojoodi readonly='readonly' >"; } echo"<input type='hidden' name=CodeMoshtari value=$CodeMoshtari />";
echo "<input type='submit' name='sabt' value='ثبت' id='sabt'/></form>";
echo"</div>";echo"</div>";
?><input type="hidden" style="text-align:right" readonly="readonly"/>
اینم کد SbtF.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 content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>ثبت فروش</title><script type="text/javascript" src="Scripts/jquery.js"></script>
</head>
<body><?phpvar_dump($_REQUEST);
$CodeMoshtari=$_REQUEST['CodeMoshtari'];var_dump($_REQUEST['CodeMoshtari']);
$CodeKala=$_REQUEST['CodeKala'];
$Tedad=$_REQUEST['Tedad'];var_dump($_REQUEST['Tedad']);
$Mojoodi=$_REQUEST['Mojoodi'];var_dump($_REQUEST['Mojoodi']);
$Gheimat=$_REQUEST['Gheimat'];var_dump($_REQUEST['Gheimat']);
$SaghfeSefaresh=$_REQUEST['SaghfeSefaresh'];var_dump($_REQUEST['SaghfeSefaresh']);
include 'DateTime.php';$Shamsi = jdate('Y-m-d','','','','en');var_dump($Shamsi);
$con=mysqli_connect("localhost","root","","daroopakhsh");
// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$con->set_charset("utf8");
$result=mysqli_query($con,"SELECT ShomareFaktor FROM faktor ORDER BY ShomareFaktor DESC LIMIT 1");if(!$result)die('not select ShomareFaktor');$row = mysqli_fetch_array($result);$SF=$row['ShomareFaktor']+1;var_dump($SF);
$i=0;foreach($CodeKala as $Ck){$i++; $n=$i;
}$Mablagh=0; $Jam=0;$i=0;while($i<$n){$Ss=$SaghfeSefaresh[$i];$Mj=$Mojoodi[$i];$Gm=$Gheimat[$i];$Ck=$CodeKala[$i];$Td=$Tedad[$i];
if($Td!='' && $Td!=0 ){if($Td<$Mj && $Td<$Ss){
$Jam=$Td*$Gm;
$Mj=$Mj-$Td;
$result=mysqli_query($con," UPDATE kala set Mojoodi='".$Mj."' WHERE CodeKala='".$Ck."'"); if(!$result)die('no result update mojoodi');
$result=mysqli_query($con,"INSERT INTO Sefaresh (CodeKala,Tedad,ShomareFaktor)VALUES ('$Ck','$Td','$SF')") ; if(!$result)die('no Insert to sefaresh'); else echo'hiiiiiiii';
}$i++;$Mablagh=$Jam+$Mablagh;
}
var_dump($Mablagh);
$result=mysqli_query($con,"INSERT INTO Faktor (Mablagh,Tarikh,CodeMoshtari)VALUES ('$Mablagh','$Shamsi','$CodeMoshtari')") ; if(!$result)die('no Insert to Faktor');
}/*$Mj=$Mj-$Td;$result=mysqli_query($con," UPDATE kala set Mojoodi='".$Mj."' WHERE CodeKala='".$Ck."'"); if(!$result)die('no result update mojoodi'); */header('LOCATION:./Moshahede_b.php');
?></body>
</html>