Here is my HTML code and there is PHP code too.
I have included both of my files and I've tried mostly all options. I know my all locations are correct so I've hidden those, other than that everything is there in the code.
<!DOCTYPE html>
<html>
<head>
<title> CK EDITOR </title>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="fontawesome/fontawesome-free-5.0.6/web-fonts-with-css/css/fontawesome.min.css">
<script src="ckeditor/ckeditor/ckeditor.js" type="text/javascript" ></script>
</head>
<body>
<br>
<a class="btn btn-success" href="textareaNB.php"> Home </a>
<a class="btn btn-success" href="ListNB.php">Lists</a>
<br><br>
<form action="add.php" method="POST" enctype="multipart/form-data">
<textarea class="ckeditor" id="editor"></textarea>
<br>
<button type="submit" name="submit" class="btn btn-sucess">submit</button>
</form>
</body>
</html>
<?php
$path='lcoation';
include ($path);
include 'textareaNB.php';
session_start();
if($username == true){
}
else{
header("location: http://localhost/Project/signupnb.php");
exit();
}
$user=$_SESSION['user'];
if(isset($_POST['submit']))
{
$date=date("Y/M/D");
$entry=$_POST['editor'];
$conn2=mysqli_connect("localhost","root","") or die(mysql_error());
mysqli_Select_db($conn2,"editor") or die("connot connect to the database");
mysqli_query($conn2,"INSERT INTO `editornb` (`user_uid`, `content`, `date`) values ('".$user."','".$entry."','".$date."')");
print'<script> alert("Sucessfully Inserted!!!");</script>';
print'<script> windows.location.assign("http://localhost/Project/projectNB.php");</script>';
}
else{
header("location:http://localhost/Project/projectNB.php");
exit();
}