我正在爲應用程序使用codeigniter。首先,我創建了包含Message TextArea Box,DropDownlist,其值來自數據庫並提交按鈕的視圖。我有兩個colums一個用於手機號碼和另一個服務提供商的數據庫。我有預定義的URL與查詢字符串值(http://www.something.com?mobno=numbervar & msg = messagevar)使用foreach循環通過url發送查詢字符串值
在模型類,我有一個名爲getProvider1的函數,以獲得返回特定提供者的移動號碼的數組。我應該使用上面的URL來查詢字符串,傳遞用戶輸入的手機號碼和消息。在這裏,我使用foreach循環通過查詢字符串將消息傳遞給不同的手機號碼。
問題是,我無法知道如何將消息傳遞到多個手機號碼,而無需訪問那些something.com頁面,並顯示結果哪個查詢字符串值被傳遞,哪些失敗......在這裏,我不能' t使用foreach在該URL中傳遞不同的查詢字符串值。它只訪問一個頁面或重定向一次....是否有任何功能像重定向()....或任何其他選項。請想一些建議...將不勝感激....以下是控制器的功能,首先發送消息
function message()
{ $message = $this->input->post('message');
$provider = $this->input->post('provider');
if($provider == 'provider1')
{
$number = $this->message_model->getProvider1();
$mobile = array();
foreach($number as $no)
{
$mobile = $no;
redirect('http://something.com?mobno='.$mobile.'&msg='.$message);
}
}
else if
{
// same process for service provider2
}
else
{
//other service provider
}
}