我知道这些问题已被低估或关闭,但我已经完成了所有之前提出的问题,但找不到任何解决方案。代码应该接受来自HTML表单的输入并将其插入MySQL数据库并显示在另一个页面上,但不知何故,我最终得到查询失败的语句并重定向到Login页面。
<?php
if (isset($_POST['eTransport_ID'])){
$id = ($_POST['eTransport_ID']);
}
if (isset($_POST['Phone_No'])){
$phone = ($_POST['Phone_No']);
}
if (isset($_POST['Amount'])){
$amount = ($_POST['Amount']);
}
$DATEE = date("Y-m-d");
$TIMEE = date("h:i:sa");
$query = "INSERT INTO recharge_history(Date, Time, Amount, Agent_No, eTransport_ID) VALUES ('$DATEE', '$TIMEE', '$amount', 'WEB', '$id')";
$added = mysqli_query($conn, $query);
if(!$added){
die("Database query failed.");
}
else{
echo "Data Entered Successfully";
}
mysqli_close($conn);
?>
答案 0 :(得分:0)
如果我的假设是正确的,只需将查询行更改为此(即:复制并粘贴):
yourImageView.isHighlighted = !yourImageView.isHighlighted
if yourImageView.isHighlighted
{
//so now the UIImageView shows stop image that means we are in recording mode
// do the actions that are to be done in recording mode like start recording updating other UI etc
}
else
{
//so now the UIImageView shows Record/Trigger image that means are in normal mode or not recording
// do the actions that are to be done in normal mode like stop recording (if required )updating other UI etc
}
答案 1 :(得分:0)
$ query =“INSERT INTO recharge_history(日期,时间,金额,Agent_No,eTransport_ID)价值('$ DATEE','$ TIMEE','$ amount','WEB','$ id')”; < / p>
你能写这样的查询吗?
$ query =“INSERT INTO recharge_history(日期,时间,金额,Agent_No,eTransport_ID)价值($ DATEE,$ TIMEE,$ amount,$ phone,$ id)”;