我想使PHP採取productsq複選框作爲數組和消息PHP發送消息包括複選框陣列
發送過來這不是代碼,它只是其中的
的一部分,這是HTML部分
<input type="checkbox" id="productsq" name="productsq[]" value="cardprinter"/> <input type="checkbox" id="productsq" name="productsq[]" value="hotelsolution"/ >
這是PHP部分
<?php
$productsqu= implode(',',mysql_real_escape_string($_post['productsq']));
$message = '<html><body>';
$message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
$message .= "<tr style='background: #eee;'><td><strong>products:</strong>
$message .= "<tr style='background: #eee;'><td><strong>comments:</strong> </td> <td>" .clean_string($_POST['comments']) . "</td></tr>";
$message .= "<tr style='background: #eee;'><td><strong>selectionField:</strong> </td><td>" .clean_string($_POST['selectionField']) . "</td></tr>";
$message .= "<tr style='background: #eee;'><td><strong>products:</strong> </td><td>" .clean_string($productsqu) ."</td></tr>";
$message .= "</table>";
$message .= "</body></html>";
?>
我也嘗試過使用這個,但它沒有奏效,有沒有辦法讓它正常工作?
$productsqu= implode(',',mysql_real_escape_string($_post['productsq']));
我知道 是這樣工作 $ productsq =破滅的溶液( ' '$ _ POST [' productsq']); – 2013-02-17 22:39:43