0
我不確定此標題是否是此問題的正確標題。 我的問題是..有一個表格,需要從文檔複製粘貼&粘貼。如何清除複製粘貼數據到表單
下面是我的代碼:
// length of rrnNo = 12 character, could be append with spaces and start with spaces as well
$RRN = $this->input->post('rrnNo');
// do some search using $RRN
$checkRRN = strpos($text, $RRN)
if ($checkRRN !== FALSE)
{
print $text;
}
我打了一個錯誤,由此,當用戶複製和粘貼整個12位,沒有搜索結果的顯示。但是當他們複製並粘貼最後9位數字時,他們設法得到結果。所以我做的是..
// length of rrnNo = 12 character, could be append with spaces and start with spaces as well
$RRN = $this->input->post('rrnNo');
// get last 9 digits
$shortRRN = substr($rrn,-9);
// do some search using shortRRN
$checkRRN = strpos($text, $shortRRN)
if ($checkRRN !== FALSE)
{
print $text;
}
但仍然不能使用12位數字。他們仍然需要粘貼9位數據才能得到結果。感謝您的建議/意見。 感謝
這是什麼語言?請標記正確的語言。 – Fallenreaper
對不起..它的PHP ..謝謝 – Julie
這聽起來像一個客戶端問題,與PHP無關。使用瀏覽器的F12工具來檢查實際的請求表單 - 發送到您的PHP腳本的數據。 – Dai