|
|
|
รบกวนหน่อยจร้า แอดลงฐานข้ออมูลไม่ได้ ช่วยแก้หน่อยนร๊า |
|
|
|
|
|
|
|
อันนี้เป็นฟอร์มแอดลงฐานข้อมูล
Code (PHP)
<?
require_once("../connect.php");
$d=date("d");
$m=date("m");
$y=date("Y");
$y=$y+543;
$year=$y;
$date=$d."-".$m."-".$y;
$totalmoney=$sum;
$id=$_GET["txtKeyword"];
$cmd="INSERT INTO `saving`.`dividend` (`year` ,`totalmoney` ,`id`,`date`)
VALUES ('$year', '$totalmoney', '$id', '$date');";
if(mysql_query($cmd))
{
?>
<script language="javascript">
alert("save total money in dividen");
window.location="dividend.php";
</script>
<?
}
else
{
?>
<script language="javascript">
alert("errorrrrrrrrrrr");
window.location="../board/welcome.php";
</script>
<?
}
?>
|
|
|
|
|
Date :
2014-01-26 22:34:49 |
By :
bleachzaa |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?
require_once("../connect.php");
$d=date("d");
$m=date("m");
$y=date("Y");
$y=$y+543;
$year=$y;
$date=$d."-".$m."-".$y;
$totalmoney=$sum;
$id=$_GET["txtKeyword"];
$cmd="INSERT INTO `saving`.`dividend` (`year` ,`totalmoney` ,`id`,`date`)
VALUES ('$year', '$totalmoney', '$id', '$date');";
$QueryObj = mysql_query($cmd) or die(mysql_error()); #เอา error มาดูครับ
if($QueryObj)
{
?>
<script language="javascript">
alert("save total money in dividen");
window.location="dividend.php";
</script>
<?
}
else
{
?>
<script language="javascript">
alert("errorrrrrrrrrrr");
window.location="../board/welcome.php";
</script>
<?
}
?>
|
|
|
|
|
Date :
2014-01-26 23:18:39 |
By :
arm8957 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|