我正在使用以下代码将数据插入mysql数据库表中。但是,当我运行脚本时,它既不执行也不返回任何错误。请协助。这是代码:
<?php
session_start();
$name=$_POST['name'];
$location=$_POST['location'];
$contact=$_POST['contact'];
$user=$_SESSION['user'];
require '../database/dbconfig.php';
$sqlclient="INSERT INTO tblclients(name,location_,contact_,user)
VALUES('$name', '$location', '$contact', '$user')";
$result=mysqli_query($con,$sqlclient);
if ($result==true) {
?>
<script type="text/javascript">
window.top.location.href='clients.php?info=added_successfully';
</script>
<?php
}
?>