D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
markniuj
/
bazmeasar.com
/
admin
/
Filename :
process_category.php
back
Copy
<?php include "../config.php"; ?> <?php // Retrieve form data $catname = $_POST['catname']; // Insert data into the database $sql = "INSERT INTO categories (catname) VALUES ('$catname')"; if ($conn->query($sql) === TRUE) { // Redirect to index.php header("Location: index.php"); exit; // Ensure that no further code is executed } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?>