PK

ADDRLIN : /home/bw2hgtn172qm/www/jeffharrismusic.com/ChettinadTiles/
FLL :
Current File : /home/bw2hgtn172qm/www/jeffharrismusic.com/ChettinadTiles/index.php

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>tiles Form</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 600px;
            margin: 50px auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }

        label {
            display: block;
            margin-bottom: 8px;
        }

        input, select {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        input[type="file"] {
            cursor: pointer;
        }

        button {
            background-color: #4caf50;
            color: #fff;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>

<div class="container">
        <h2>Customer Details</h2>
        <form action="display_data.php" method="post" enctype="multipart/form-data" id="mainForm">
            
            <label for="customerName">Customer Name:</label>
            <input type="text" id="customerName" name="customerName" required>

            <label for="phone">Phone:</label>
            <input type="tel" id="phone" name="phone" required>

            <label for="address">Address:</label>
            <textarea id="address" name="address" rows="4" required></textarea>

            <label for="gst">GST:</label>
            <input type="text" id="gst" name="gst">

            <div id="roomFields">
                <!-- Room fields will be added here dynamically -->
            </div>

            <button type="button" onclick="addRoom()">Add Room</button>
            
            <button type="submit">Submit</button>
        </form>
    </div>

    <script>
    function addRoom() {
        var roomFieldsDiv = document.getElementById('roomFields');

        var newRoomDiv = document.createElement('div');
        newRoomDiv.innerHTML = `
            <hr>
            <h3>Room Details</h3>
            <label for="roomName">Room Name:</label>
            <input type="text" name="roomName[]">

            <label for="tilesImage">Tiles Image:</label>
            <input type="file" name="tilesImage[]" accept="image/*" required>
            
            <label for="roomSqft">Square Feet Needed:</label>
            <input type="number" name="roomSqft[]" oninput="calculateRoomValue(this)" required>

            <label for="runtilesImage">skirting Tiles Image:</label>
            <input type="file" name="runtilesImage[]" accept="image/*" required>
            

            <label for="RunSqft">skirting Tiles Sqft:</label>
            <input type="number" name="RunSqft[]" oninput="calculaterunningValue(this)" required>

            <label for="customTilePrice">Custom Tile Price:</label>
             <input type="number" name="customTilePrice[]" value="30" required>

           <label for="customSkirtingPrice">Custom Skirting Tile Price:</label>
             <input type="number" name="customSkirtingPrice[]" value="40" required>

           
        `;

        roomFieldsDiv.appendChild(newRoomDiv);
    }

    function calculateRoomValue(input) {
        // Calculate and update the value of "Square Feet Needed" for the room
        var roomSqft = parseFloat(input.value);
        input.nextElementSibling.value = roomSqft * 1.5;
    }
    function calculaterunningValue(input) {
        var RunSqft = parseFloat(input.value);
        input.nextElementSibling.value = RunSqft * 1.3;
    }
</script>


</body>
</html>


PK 99