File manager - Edit - /home/autoph/public_html/pms_v1/mancom/adrian.php
Back
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel</title> <!-- Fonts --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> <link href="https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet"> <!-- Styles --> <style> body { font-family: 'Nunito', sans-serif; } </style> </head> <body class="antialiased"> <div class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center py-4 sm:pt-0 p-3"> <?php $headerData = [ 'Ranger','F150','Raptor','Mustang' ]; $month = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; ?> <table class="table table-primary"> <tr> <th></th> <!-- Empty cell for the first column --> <?php foreach ($headerData as $header) { echo '<th>' . $header . '</th>'; // Output table header cells } ?> </tr> <?php for ($i = 0; $i < count($month); $i++) { echo '<tr>'; echo '<td>' . $month[$i] . '</td>'; // Output the month as a regular cell for ($j = 0; $j < count($headerData); $j++) { echo '<td><input type="text" data-month="' . $month[$i] . '" data-header="' . $headerData[$j] . '" class="data-input"/></td>'; } echo '</tr>'; } ?> </table> <script> const dataInputs = document.querySelectorAll('.data-input'); dataInputs.forEach(input => { input.addEventListener('click', function() { const month = this.getAttribute('data-month'); const header = this.getAttribute('data-header'); const value = this.value; // Perform your desired action with the data console.log('Month:', month); console.log('Header:', header); console.log('Value:', value); }); }); </script> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings