| Server IP : 173.209.174.21 / Your IP : 216.73.216.89 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/thelittlebigshow/vendors/ |
Upload File : |
<?php
session_start();
include_once("db.php");
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$vendor_name = mysqli_real_escape_string($conn, $_POST['vendor_name']);
$contact_number = mysqli_real_escape_string($conn, $_POST['contact_number']);
$business_type = mysqli_real_escape_string($conn, $_POST['business_type']);
$vendor_type = mysqli_real_escape_string($conn, $_POST['vendor_type']);
$mailing_address = mysqli_real_escape_string($conn, $_POST['mailing_address']);
$city = mysqli_real_escape_string($conn, $_POST['city']);
$state = mysqli_real_escape_string($conn, $_POST['state']);
$zip = mysqli_real_escape_string($conn, $_POST['zip']);
$email = mysqli_real_escape_string($conn, $_POST['email']);
$website = mysqli_real_escape_string($conn, $_POST['website']);
$booth_count = (int) $_POST['booth_count'];
// Inserting vendor data into a new vendor table (assuming a new database setup)
$sql = "INSERT INTO vendors (vendor_name, contact_number, business_type, vendor_type, mailing_address, city, state, zip, email, website, booth_count)
VALUES ('$vendor_name', '$contact_number', '$business_type', '$vendor_type', '$mailing_address', '$city', '$state', '$zip', '$email', '$website', '$booth_count')";
if (mysqli_query($conn, $sql)) {
$_SESSION['msg'] = "Vendor registered successfully!";
header("Location: index.php");
} else {
$_SESSION['msg'] = "Registration failed. Please try again.";
}
mysqli_close($conn);
}
?>