|
![](/images/resource/spacer.gif) |
|
ช่วยผมทีครับ พอผมกด เซฟอัพเดท ข้อมูลแล้วมันขึ้น error save ครับ ผมมีรูป ครับ แต่แก้ไขเรคอดแรกได้ แเรคอดทีสองไม่ได้ครับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
![err err](https://www.thaicreate.com/upload/stock/20150512203007.jpg?v=1001)
Code (PHP)
<?php
if(!empty($_POST));
$strSQL = "INSERT INTO scorep";
$strSQL .= "score1 = '".$_POST["score1"]."' ";
$strSQL .= ",score2 = '".$_POST["score2"]."' ";
$strSQL .= ",score3 = '".$_POST["score3"]."' ";
$strSQL .= ",score4 = '".$_POST["score4"]."' ";
$strSQL .= ",score5 = '".$_POST["score5"]."' ";
$strSQL .= ",score6 = '".$_POST["score6"]."' ";
$strSQL .= ",score7 = '".$_POST["score7"]."' ";
$strSQL .= ",score8 = '".$_POST["score8"]."' ";
$strSQL .= ",text1 = '".$_POST["txt1"]."' ";
$strSQL .= ",text2 = '".$_POST["txt2"]."' ";
$strSQL .= ",text3 = '".$_POST["txt3"]."' ";
$strSQL .= ",text4 = '".$_POST["txt4"]."' ";
$strSQL .= ",text5 = '".$_POST["txt5"]."' ";
$strSQL .= ",text6 = '".$_POST["txt6"]."' ";
$strSQL .= ",text7 = '".$_POST["txt7"]."' ";
$strSQL .= ",text8 = '".$_POST["txt8"]."' ";
$strSQL .= "WHERE UserID = '".$_GET["UID"]."' ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
mysq
l_close($objConnect);
?>
Tag : PHP
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-05-12 20:31:31 |
By :
Saharatza |
View :
594 |
Reply :
4 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
Code (PHP)
<?php
if(!empty($_POST));
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("project");
$strSQL = "INSERT INTO scorep";
$strSQL .= "score1 = '".$_POST["score1"]."' ";
$strSQL .= ",score2 = '".$_POST["score2"]."' ";
$strSQL .= ",score3 = '".$_POST["score3"]."' ";
$strSQL .= ",score4 = '".$_POST["score4"]."' ";
$strSQL .= ",score5 = '".$_POST["score5"]."' ";
$strSQL .= ",score6 = '".$_POST["score6"]."' ";
$strSQL .= ",score7 = '".$_POST["score7"]."' ";
$strSQL .= ",score8 = '".$_POST["score8"]."' ";
$strSQL .= ",text1 = '".$_POST["txt1"]."' ";
$strSQL .= ",text2 = '".$_POST["txt2"]."' ";
$strSQL .= ",text3 = '".$_POST["txt3"]."' ";
$strSQL .= ",text4 = '".$_POST["txt4"]."' ";
$strSQL .= ",text5 = '".$_POST["txt5"]."' ";
$strSQL .= ",text6 = '".$_POST["txt6"]."' ";
$strSQL .= ",text7 = '".$_POST["txt7"]."' ";
$strSQL .= ",text8 = '".$_POST["txt8"]."' ";
$strSQL .= "WHERE UserID = '".$_GET["UID"]."' ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-05-12 20:34:09 |
By :
Saharatza |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ตัวอย่างการ Insert ครับ
Code (PHP)
<?php
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
$strSQL = "INSERT INTO customer ";
$strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["txtCustomerID"]."','".$_POST["txtName"]."','".$_POST["txtEmail"]."' ";
$strSQL .=",'".$_POST["txtCountryCode"]."','".$_POST["txtBudget"]."','".$_POST["txtUsed"]."') ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-05-13 09:51:32 |
By :
mr.win |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
![](/images/bbcode/lol.gif?v=1001)
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-05-13 14:27:36 |
By :
Saharatza |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
Update ข้อมูลครับ
Code (PHP)
$strSQL = "UPDATE scorep SET ";
$strSQL .= "score1 = '".$_POST["score1"]."' ";
$strSQL .= ",score2 = '".$_POST["score2"]."' ";
$strSQL .= ",score3 = '".$_POST["score3"]."' ";
$strSQL .= ",score4 = '".$_POST["score4"]."' ";
$strSQL .= ",score5 = '".$_POST["score5"]."' ";
$strSQL .= ",score6 = '".$_POST["score6"]."' ";
$strSQL .= ",score7 = '".$_POST["score7"]."' ";
$strSQL .= ",score8 = '".$_POST["score8"]."' ";
$strSQL .= ",text1 = '".$_POST["txt1"]."' ";
$strSQL .= ",text2 = '".$_POST["txt2"]."' ";
$strSQL .= ",text3 = '".$_POST["txt3"]."' ";
$strSQL .= ",text4 = '".$_POST["txt4"]."' ";
$strSQL .= ",text5 = '".$_POST["txt5"]."' ";
$strSQL .= ",text6 = '".$_POST["txt6"]."' ";
$strSQL .= ",text7 = '".$_POST["txt7"]."' ";
$strSQL .= ",text8 = '".$_POST["txt8"]."' ";
$strSQL .= "WHERE UserID = '".$_GET["UID"]."' ";
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2015-05-13 14:56:32 |
By :
slurpee55555 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 03
|