[請益] php如何莮取html中的array?

看板PHP作者 (junzuo)時間17年前 (2008/12/13 15:13), 編輯推噓4(4011)
留言15則, 7人參與, 最新討論串1/1
했蚖各位 稛是小弟的程式 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>Calculation</title> <link href="./css/css.css" rel="stylesheet" type="text/css" /> </head> <body class="content"> <form name="cForm" target="BLANK" action="foo.php" method="post"> <table width="99%" border="0" align="center" cellpadding="1" cellspacing="0"> . . . <td height="34" width="28">1.</td> <td height="34" width="6">&nbsp;</td> <td height="34" width="267"><input type="text" name="TAOBAO_URL[0]" size=40 ></td> <td height="34" width="95"><input type="text" name="PRICE[0]" size=10 ></td> <td height="34" width="46"><input type="text" name="NUMBER[0]" size=5 ></td> <td height="34" width="106"><input type="text" name="DELIVERY_PRICE[0]" size=5 ></td> <td height="34" width="127"><input type="text" name="ITEM_AMOUNT[0]" size=10 readonly></td> <td height="34" width="284"><input type="text" name="COMMENT[0]" size=45 ></td> </tr> . . . 晧晧晧部分省略了 重晧是在PRICE[0],NUMBER[0],DELIVERY_PRICE[0]等等的列 晧晧晧下面都是一刴 列0~9 뾂共10芀 小弟我想把這些值仫進foo.php(自己定的) 然后在里面把值仫到mysql <?php require_once('db_login.php'); $connection = mysql_connect($db_host, $db_username, $db_password); if (!$connection){ die ("Could not connect to the database: <br />". mysql_error( )); } // Select the database $db_select=mysql_select_db('calculation',$connection); if (!$db_select) { die ("Could not select the database: <br />". mysql_error( )); } $p=$_POST['PRICE[0]']; <====但是失椣 $num=$_POST['NUMBER[0]']; <====失椣 $sql = "INSERT INTO `calculation`.`fee calculation` (`URL`, `Product Price (RMB)`, `Amount`, `Delivery Price (RMB)`, `Item Amount (RMB)`, `Total Amount (RMB)`, `Estimate Weight`,`Shipping Price`, `Total Amount(RMB)`, `total amountwith service fee`, `Final Total Amount (RM)`, `memo`) VALUES ($p,$num,1,1,1,2,3,4,5,6,7,8)"; <====失椣 $result=mysql_query($sql); if(!$result){ die("Could not query the database:<br/>".mysql_error()); } . . . 했蚖 我풓修改哪呢? 했指教 珴珴 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.95.198.133

12/13 16:01, , 1F
阿鬼...
12/13 16:01, 1F

12/13 16:08, , 2F
???
12/13 16:08, 2F

12/13 16:10, , 3F
please 求助!!!
12/13 16:10, 3F

12/13 18:32, , 4F
天書
12/13 18:32, 4F

12/13 18:51, , 5F

12/13 18:52, , 6F
했看上面的URL 3Q
12/13 18:52, 6F

12/13 18:54, , 7F
http://tinyurl.com/5v4wpe <==sorry, is this one
12/13 18:54, 7F

12/13 23:03, , 8F
12/13 23:03, 8F

12/13 23:53, , 9F
誤 $_POST['abc[0]'] 正 $_POST['abc'][0]
12/13 23:53, 9F

12/13 23:53, , 10F
希望一行解決你的問題 orz
12/13 23:53, 10F

12/14 08:20, , 11F
YBITE大 thank you你的提醒 已붛可以了 感恩 T_T
12/14 08:20, 11F

12/14 11:03, , 12F
好厲害...一篇big5的post居然可以中間幾個字是GB碼..
12/14 11:03, 12F

12/14 11:03, , 13F
我有點好奇到底是怎麼回事...@_@
12/14 11:03, 13F

12/15 08:52, , 14F
原來是穿插了GB碼… 這是怎麼辦到的? o_O
12/15 08:52, 14F

12/15 17:54, , 15F
pcman = = gb=>big5 big5=>gb
12/15 17:54, 15F
文章代碼(AID): #19Gs2FW6 (PHP)
文章代碼(AID): #19Gs2FW6 (PHP)