Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement