]]jkjjgdjffksdkdfdkasertertertrtetsadskdfgjdskfgj
במ12[aspddfasdaertertertertetghjghjsadasbvxcvxcv;'
/
home
/
u181040597
/
domains
/
jyotielevator.com
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("header.php"); include("aside.php"); if (isset($_POST['submit'])) { // Ensure you have a database connection established (assuming $connect is your database connection) // If not, you need to establish a connection like this: // $connect = mysqli_connect("hostname", "username", "password", "database_name"); // Also, use mysqli_real_escape_string to prevent SQL injection $catname = mysqli_real_escape_string($connect, $_POST['catname']); // Ensure you enclose values in single quotes in the SQL query for strings $query = "INSERT INTO `category`(`category_name`) VALUES ('$catname')"; $sql = mysqli_query($connect, $query); if ($sql) { echo "Submit"; } else { echo "Error: " . mysqli_error($connect); // Print the actual error message for debugging } } ?> <div class="container w-100 h-100 mt-5"> <button> <a class="btn btn-outline-primary" href="categoriestable.php">View Data</a></button> <h3 class="text-center">Categories</h3> <div class="row"> <div class="col-md-6 mt-5"> <form method="post"> <div class="form-group"> <label for="catname">Categories Name:</label> <input type="text" class="form-control" name="catname" id="catname" placeholder="Categories Name"> </div> <div class="form-check"> <input type="checkbox" class="form-check-input" id="exampleCheck1"> <label class="form-check-label" for="exampleCheck1">Check me out</label> </div> <button type="submit" class="btn btn-primary" name="submit">Submit</button> </form> </div> </div> </div> <?php include("footer.php"); ?>