The data got inserted into table successfully when I am inserting locally but it is not inserting when I am inserting on Server.
I have tried locally it got Inserted but When trying to add on Server it is not inserting nor giving any error!
if(isset($_REQUEST["submit_newlaw"]))
{
$file=$_FILES["file"]["name"];
$court = $_POST['court'];
$citation = $_POST['citation'];
$appelant = $_POST['appelant'];
$opponent = $_POST['opponent'];
$judge = $_POST['judge'];
$judgement = $_POST['judgement'];
$reference = $_POST['reference'];
$year = $_POST['year'];
$detail = $_POST['detail'];
$tmp_name=$_FILES["file"]["tmp_name"];
$path="../case_laws/new/".$file;
$file1=explode(".",$file);
$ext=$file1[1];
$allowed=array("jpg","png","pdf","pdf","docx","doc");
if(in_array($ext,$allowed))
{
move_uploaded_file($tmp_name,$path);
$sql = "insert into new_caselaws(id, court, citation, appelant, opponent,
judge, judgement, reference, year, detail,file)values('', '$court',
'$citation', '$appelant', '$opponent', '$judge', '$judgement',
'$reference', '$year', '$detail','$file')";
mysqli_query($db, $sql);
echo "Successfull";
}
Expected result is to data got inserted successfully.