Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > พี่ๆช่วยหน่อยค่ะ ไม่รุเป็นไร Add ข้อมูลไม่ได้นะค่ะ แต่ในเครื่องทำได้นะค่ะ พอขึ้น host แล้วใช่ไม่ได้นะค่ะ



 

พี่ๆช่วยหน่อยค่ะ ไม่รุเป็นไร Add ข้อมูลไม่ได้นะค่ะ แต่ในเครื่องทำได้นะค่ะ พอขึ้น host แล้วใช่ไม่ได้นะค่ะ

 



Topic : 033859



โพสกระทู้ ( 151 )
บทความ ( 0 )



สถานะออฟไลน์




พี่ๆช่วยหน่อยค่ะ ไม่รุเป็นไร Add ข้อมูลไม่ได้นะค่ะ แต่ในเครื่องทำได้นะค่ะ พอขึ้น host แล้วใช่ไม่ได้นะค่ะ ช่วยหน่อยนะค่ะ รบกวนด้วยค่ะ ขอบคุณพี่ๆ ทุกคนล่วงหน้าค่ะ

Code (PHP)
<?php
#### สคริ๊ปนี้ใช้ในการเช็ค ว่าล็อกอินหรือยัง ให้นำสคริ๊ปนี้ไปไว้ที่หน้าที่คุณต้องการให้เช็ค ####
session_start() ;
if(!session_is_registered("login_true")) {
//  url=index.php คำสั่งนี้จะให้ไปหน้าที่จะต้องกรอก user,pwd ถ้าอยู่โฟล์เดอร์อื่นให้เรียกให้ถูกนะครับ
echo "<meta http-equiv='refresh' content='0;url=index.php'>" ; 
exit() ;
}
### จบการเช็ค ###
?>
<?

	include("../include/function.php");
	con();


if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
{
########### image ############
$main_dir="../images/";
$sub_dir="product/";
############################

$pic_1=upload_images($_FILES['pic_1'],$main_dir,$sub_dir);

$name=$_POST[name];


$sql = "select * from product_cat order by id desc" ;
$result = mysql_query($sql) ;
$num_result  = mysql_num_rows($result) ;
$dbarr = mysql_fetch_row($result) ;

	mysql_query("INSERT INTO `product_cat` (name , pic1 , active , added) VALUES ('".$name."' ,'".$pic_1."', 'yes' , NOW( ) )") or die("ERROR : INSERT INTO `product_cat` (name , pic1 , active , added) VALUES ('".$name."' ,'".$pic_1."', 'yes' , NOW( ) )");

	echo "<meta http-equiv='refresh' content='0; url=product.php'>" ;
}

include("header.php");
?>
<style type="text/css">
<!--
.style1 {font-family: "MS Sans Serif"}
.style2 {
	color: #0000FF;
	font-size: 14px;
}
.style3 {color: #000000}
.style5 {
	color: #000000;
	font-size: 14px;
	font-family: "Microsoft Sans Serif";
}
.style7 {
	font-family: "MS Sans Serif";
	font-size: 14px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #0000FF;
}
a:hover {
	text-decoration: none;
	color: #0000FF;
}
a:active {
	text-decoration: none;
	color: #0000FF;
}
-->
</style>

				
				<table width="883" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="754" align="left" valign="bottom"><table width="754" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="left" valign="middle" class="ape-b14 style2"><strong><span class="style1"><a href="product.php" class="ape-b14">Product&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></span></strong><span class="ape-12 style1"><strong>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></span><span class="style1"><strong class="ape-12">Add Product</strong></span></td>
                      </tr>
                    </table></td>
                    <td width="129" align="right" valign="middle"><A HREF="logout.php"><img src="images/btu_logout.gif" width="78" height="30" border=0 /></A></td>
                  </tr>
</table></td>
                <td background="images/bg_top_main.gif">&nbsp;</td>
              </tr>
              <tr>
                <td height="1" bgcolor="#e0e0e0"><img src="images/space.gif" width="1" height="1" /></td>
                <td height="1" align="left" valign="top" bgcolor="#e0e0e0"><img src="images/space.gif" alt="" width="1" height="1" /></td>
                <td height="1" bgcolor="#e0e0e0"><img src="images/space.gif" alt="" width="1" height="1" /></td>
              </tr>
              <tr>
                <td height="243" background="images/bg_top_main.gif">&nbsp;</td>
                <td height="243" align="left" valign="top" background="images/bg_top_main.gif">
				
				<FORM METHOD=POST ACTION="" name="form" encType="multipart/form-data">
                <table width="883" border="0" align="center" cellpadding="0" cellspacing="0">
                  <!--DWLayoutTable-->
                  <tr>
                    <td width="883" height="32" valign="top"><img src="images/space.gif" width="1" height="32" /></td>
                  </tr>
                  <tr>
                    <td height="81" align="left" valign="top">
					
					  <table width="883" border="0" cellspacing="0" cellpadding="0">
					    <!--DWLayoutTable-->
                      <tr>
                        <td width="103" height="36" align="right" valign="middle" class="ape-12"><div align="left" class="style5"><strong>Logo</strong></div></td>
                        <td width="32">&nbsp;</td>
                        <td width="748" align="left" valign="middle"><input type="file" name="pic_1" id="pic_1" style="width:340px;height:25;" /></td>
                      </tr>
                      <tr>
                        <td height="36" align="right" valign="middle"><div align="left" class="style5"><strong>Name</strong></div></td>
                        <td>&nbsp;</td>
                        <td valign="top"><span class="txt_content">
                        <input name="name" type="text" class="box" id="name" value=""  style="width:340px;height:25px;" />
                        </span></td>
                      </tr>
                      <tr>
                        <td height="9"></td>
                        <td></td>
                        <td></td>
                      </tr>
                                          </table></td>
                  </tr>
                  <tr>
                    <td height="38">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="68" valign="top">
					
					  <table width="883" border="0" cellspacing="0" cellpadding="0">
					    <!--DWLayoutTable-->
                      <tr>
                        <td width="76" height="32">&nbsp;</td>
                        <td width="125" align="left" valign="middle"><a href="#" onclick="javascript:document.form.submit()"><img src="images/btu_submit.png" width="89" height="32" border="0" /></a></td>
                        <td width="682" align="left" valign="middle"><A HREF="create_product.php" ><img src="images/btu_reset.png" width="77" height="32" border="0" /></a></td>
                      </tr>
                      <tr>
                        <td height="32"></td>
                        <td></td>
                        <td></td>
                      </tr>
                                                                      </table></td>
                  </tr>
                </table>
                </FORM>
				
				</td>
                </tr>
				<? include("footer.php"); ?>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-11-04 13:24:30 By : sangkheb View : 767 Reply : 1
 

 

No. 1



โพสกระทู้ ( 1,322 )
บทความ ( 0 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์


เป็นเพราะ register_global = Off หรือป่าวลองเช็คดู

หรือเข้าไปดูกระทู้นี้ https://www.thaicreate.com/php/forum/023882.html






Date : 2009-11-04 13:52:31 By : pokultra
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : พี่ๆช่วยหน่อยค่ะ ไม่รุเป็นไร Add ข้อมูลไม่ได้นะค่ะ แต่ในเครื่องทำได้นะค่ะ พอขึ้น host แล้วใช่ไม่ได้นะค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่