0
if (mysqli_connect_errno()==0)
{ // if successfully connected
$sent_dt=$_POST['scts'];
// important: escape string values
$txt=mysqli_real_escape_string($con, $_POST['text']);
$snd=mysqli_real_escape_string($con, $_POST['sender']);
// creating an sql statement to insert the message into the SMS_IN table
$sql="INSERT INTO SMS_IN(studentID,lastname,firstname,class) VALUES ('34','Lekan','Balogun','Grade8')";
// executing the sql statement
$insert_sms_success = mysqli_query($con,$sql);
// closing the connection
mysqli_close($con);
}
已經收到一些不太清楚的信息。我希望能夠使用兩者之間的空格拆分傳入的短信(例如32 Lekan Balogun Grade8),以將每個文本分隔爲字段。我現在擁有的是整個短信。我希望能夠將文本之間的空格拆分爲MySql數據庫。由於在期待,因爲這是我的課堂作業使用空格分割文本並插入到mysql數據庫中
https://www.google.co.nz/search?q=php+split+by+space&oq=php+split+by+space&aqs=chrome.0.57j60j65j60l3.5659&sourceid=chrome&ie=UTF-8 – jdog