| 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/vendorset/Vendorapp/backup files/ |
Upload File : |
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
session_start();
include 'config.php';
// Database connection with error checking
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Check if form data is being received
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Sanitize and validate inputs
$name = $_POST['name'] ?? null;
$email = $_POST['email'] ?? null;
$phone = $_POST['phone'] ?? null;
$address = $_POST['address'] ?? null;
$city = $_POST['city'] ?? null;
$state = $_POST['state'] ?? null;
$zip = $_POST['zip'] ?? null;
$website = $_POST['website'] ?? null;
$description = $_POST['description'] ?? null;
$category = $_POST['category'] ?? null;
// Debug output for form data
echo "Form Data:<br>";
echo "Name: $name<br>";
echo "Email: $email<br>";
echo "Phone: $phone<br>";
echo "Address: $address<br>";
echo "City: $city<br>";
echo "State: $state<br>";
echo "Zip: $zip<br>";
echo "Website: $website<br>";
echo "Description: $description<br>";
echo "Category: $category<br>";
// Prepare the insert statement
$stmt = $conn->prepare("INSERT INTO vendors (name, email, phone, address, city, state, zip, website, description, category) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
if (!$stmt) {
die("Preparation failed: " . $conn->error);
}
// Bind parameters and execute
$stmt->bind_param("ssssssssss", $name, $email, $phone, $address, $city, $state, $zip, $website, $description, $category);
if (!$stmt->execute()) {
die("Execution failed: " . $stmt->error);
} else {
echo "Data successfully inserted.<br>";
}
$stmt->close();
// Redirect to the payment page
header("Location: payment.php");
exit();
}
$conn->close();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vendor Registration</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #F5F5F5;
color: #333333;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
flex-direction: column;
}
.logo {
width: 150px;
margin-top: 20px;
}
.main-container {
background-color: #FFFFFF;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 600px;
margin-top: 10px;
}
h2 {
color: #1E90FF;
text-align: center;
}
form {
display: flex;
flex-direction: column;
text-align: left;
}
label {
margin-top: 10px;
font-weight: bold;
}
input, textarea, select {
padding: 10px;
margin-top: 5px;
border: 1px solid #CCCCCC;
border-radius: 4px;
font-size: 16px;
}
input:focus, textarea:focus, select:focus {
border-color: #1E90FF;
outline: none;
}
button {
background-color: #1E90FF;
color: #FFFFFF;
padding: 10px;
margin-top: 20px;
border: none;
border-radius: 4px;
font-size: 18px;
cursor: pointer;
}
button:hover {
background-color: #1C86EE;
}
.agreement {
margin-top: 20px;
font-size: 14px;
}
.agreement a {
color: #1E90FF;
text-decoration: none;
}
.agreement a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<!-- Logo at the top -->
<img src="https://www.thelittlebigshow.com/wp-content/uploads/2024/02/cropped-Logo.jpg" alt="Event Logo" class="logo">
<div class="main-container">
<h2>Vendor Registration Form</h2>
<form action="register_vendor.php" method="POST">
<label for="name">Full Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email Address:</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required>
<label for="address">Address:</label>
<input type="text" id="address" name="address" placeholder="Street Address" required>
<label for="city">City:</label>
<input type="text" id="city" name="city" required>
<label for="state">State:</label>
<input type="text" id="state" name="state" required>
<label for="zip">Zip Code:</label>
<input type="text" id="zip" name="zip" required>
<label for="website">Website (if any):</label>
<input type="url" id="website" name="website">
<label for="description">Description of What You Sell:</label>
<textarea id="description" name="description" rows="4" placeholder="Describe your products or services" required></textarea>
<label for="category">Select the Closest Option of What You Sell:</label>
<select id="category" name="category" required>
<option value="" disabled selected>Select an option</option>
<option value="Food & Beverages">Food & Beverages</option>
<option value="Handmade Crafts">Handmade Crafts</option>
<option value="Clothing & Apparel">Clothing & Apparel</option>
<option value="Art & Prints">Art & Prints</option>
<option value="Electronics">Electronics</option>
<option value="Jewelry">Jewelry</option>
<option value="Books & Literature">Books & Literature</option>
<option value="Toys & Games">Toys & Games</option>
<option value="Furniture">Furniture</option>
<option value="Beauty & Personal Care">Beauty & Personal Care</option>
<option value="Sports Equipment">Sports Equipment</option>
<option value="Home Goods & Decor">Home Goods & Decor</option>
<option value="Pet Supplies">Pet Supplies</option>
<option value="Other">Other</option>
</select>
<div class="agreement">
By registering, you agree to our <a href="hold_harmless_agreement.html" target="_blank">Hold Harmless Agreement</a>.
</div>
<button type="submit">Register</button>
</form>
</div>
</body>
</html>