Jump to content

Search the Community

Showing results for 'detecting mobile device'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. If you want to disable the input elements instead of hiding them, you can modify the JavaScript code to disable or enable the form elements based on the checkbox state. Here's an updated version of the code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Toggle Forms</title> </head> <body> <input type="checkbox" id="toggleButton" onchange="toggleForms()"> <label for="toggleButton">Toggle Forms</label> <form id="form1"> <!-- Your form content goes here --> <p>Form 1</p> <input type="text" name="input1" disabled> <!-- Add more form elements as needed --> </form> <form id="form2"> <!-- Your form content goes here --> <p>Form 2</p> <input type="text" name="input2" disabled> <!-- Add more form elements as needed --> </form> <!-- Add more forms as needed --> <script> function toggleForms() { var toggleButton = document.getElementById('toggleButton'); var forms = document.querySelectorAll('form'); forms.forEach(function(form) { var formElements = form.elements; for (var i = 0; i < formElements.length; i++) { formElements[i].disabled = toggleButton.checked; } }); } </script> </body> </html>
  2. I've modified the form so that when DHCP is turned on, the form inputs are disabled, and when it is turned off, the form inputs are enabled. I've also corrected the duplicate form issue: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Configuration EMA-ETH WEB</title> <style> body { font-family: Netto-Pro; margin: 0; padding: 0; box-sizing: border-box; } @font-face { font-family: Netto-Pro; src: url(netto_pro.otf); } header { background-color: #333; color: white; text-align: center; padding: 1em; } nav { background-color: #555; overflow: hidden; } nav a { float: left; display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } nav a:hover { background-color: #ddd; color: black; } section { padding: 20px; } form { max-width: 600px; margin: 0 auto; } label { display: block; margin-bottom: 8px; } input, select { width: 100%; padding: 10px; margin-bottom: 16px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } input[type="submit"] { background-color: #4CAF50; color: white; cursor: pointer; } input[type="submit"]:hover { background-color: #45a049; } .switch { position: relative; display: inline-block; width: 60px; height: 34px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; -webkit-transition: .4s; transition: .4s; } .slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; -webkit-transition: .4s; transition: .4s; } input:checked + .slider { background-color: #2196F3; } input:focus + .slider { box-shadow: 0 0 1px #2196F3; } input:checked + .slider:before { -webkit-transform: translateX(26px); -ms-transform: translateX(26px); transform: translateX(26px); } /* Rounded sliders */ .slider.round { border-radius: 34px; } .slider.round:before { border-radius: 50%; } </style> <script> function toggleForms() { var toggleButton = document.getElementById('toggleButton'); var ipInput = document.getElementById('ip'); var smInput = document.getElementById('sm'); var dgInput = document.getElementById('dg'); var dnsInput = document.getElementById('dns'); ipInput.disabled = toggleButton.checked; smInput.disabled = toggleButton.checked; dgInput.disabled = toggleButton.checked; dnsInput.disabled = toggleButton.checked; } </script> </head> <body> <header> <h1>Configuration EMA-ETH WEB</h1> </header> <nav> <a href="#home">Home</a> <a href="#">Device Info</a> <a href="network.php">Network Settings</a> </nav> <section> <h2>Device Info</h2> <form name="f1" action="#" method="post"> <label>DHCP:</label> <label for="toggleButton" class="switch"> <input type="checkbox" id="toggleButton" onchange="toggleForms()"> <span class="slider round"></span> </label> <form id="form1"> <label for="ip">IP Address:</label> <input type="text" id="ip" name="ip" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" oninput="this.value = this.value.replace(/[^0-9.]+/g, '');" minlength="7" maxlength="15" required disabled> </form> <form id="form2"> <label for="sm">Subnet Mask:</label> <input type="text" id="sm" name="sm" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" oninput="this.value = this.value.replace(/[^0-9.]+/g, '');" minlength="7" maxlength="15" required disabled> </form> <form id="form3"> <label for="gw">Default Gateway:</label> <input type="text" id="dg" name="dg" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" oninput="this.value = this.value.replace(/[^0-9.]+/g, '');" minlength="7" maxlength="15" required disabled> </form> <form id="form4"> <label for="dns">DNS:</label> <input type="text" id="dns" name="dns" pattern="^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$" oninput="this.value = this.value.replace(/[^0-9.]+/g, '');" minlength="7" maxlength="15" required disabled> </form> <input type="submit" value="Save"> </form> </section> </body> </html>
  3. Something like this? CODE <?php include 'db_inc.php'; // YOUR CONNECTION $pdo = pdoConnect('movies'); // CODE GOES HERE ################################################################################ ## PROCESS AJAX REQUESTS ################################################################################ if (isset($_GET['ajax'])) { $res = $pdo->prepare("SELECT m.id as movie_id , m.title , m.image , g.description as genre , CONCAT(m.running_time DIV 60, ' hrs ', m.running_time % 60, ' mins') as running_time , date_format(sg.screen_on, '%W, %D %b') as date , s.name as screen_num , TIME_FORMAT(sg.screen_at, '%H:%i') as start_time FROM screening sg JOIN screen s ON sg.screen_id = s.id JOIN movie m ON sg.movie_id = m.id JOIN genre g ON g.id = m.genre WHERE dayname(screen_on) = :day ORDER BY movie_id, screen_on, sg.screen_at "); $res->execute([ 'day' => $_GET['day'] ]); $data = []; # # Put data into an array with same structure a required output # - array of movies, each movie having arrays of screenings # foreach ($res as $r) { if (!isset($data[$r['movie_id']])) { $data[$r['movie_id']] = [ 'title' => $r['title'], 'image' => $r['image'], 'genre' => $r['genre'], 'runtime' => $r['running_time'], 'screenings' => [] ]; } $data[$r['movie_id']]['screenings'][$r['date']][] = ['start' => $r['start_time'], 'sno' => $r['screen_num'] ]; } exit(json_encode($data)); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta name="generator" content="PhpED 12.0 (Build 12010, 64bit)"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>olumide</title> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script type='text/javascript'> function showScreenings(day) { $("#movie-listings").html("") $.get( "", {"ajax":1, "day":day}, function(resp) { $.each(resp, function(mid, mdata) { let title = `<h2>${mdata.title}</h2><h4 class='w3-text-gray'>${mdata.genre} (${mdata.runtime})</h4>` $("#movie-listings").append(title) $.each(mdata.screenings, function(dt, ddata) { let datesub = `<h3>${dt}</h3>` $("#movie-listings").append(datesub) $("#movie-listings").append("<div class='screenings'") $.each(ddata, function(k, sdata) { let scr = `<div class='screening'><b>${sdata.start}</b><br>${sdata.sno}</div>` $("#movie-listings").append(scr) }) $("#movie-listings").append("</div>") }) }) }, "JSON" ) } </script> <style type='text/css'> .days { padding: 16px; text-align: center; } .screening { width : 20%; display: inline-block; margin-right: 16px; margin-bottom: 8px; padding: 4px; border: 5px solid black; font-size: 9pt; } </style> </head> <body> <nav class="days"> <button onclick="showScreenings('Monday')">Monday</button> <button onclick="showScreenings('Tuesday')">Tuesday</button> <button onclick="showScreenings('Wednesday')">Wednesday</button> <button onclick="showScreenings('Thursday')">Thursday</button> <button onclick="showScreenings('Friday')">Friday</button> <button onclick="showScreenings('Saturday')">Saturday</button> <button onclick="showScreenings('Sunday')">Sunday</button> </nav> <div id='movie-listings'class='w3-content w3-padding w3-card-4'> <!-- LISTINGS GO HERE --> </div> </body> </html>
  4. Hello! Please forgive me as I am struggling to learn php now for a while. I have been trying to use php to insert my nmap xml result files into a mysql database, and have been able to get a single file to input correctly using existing code from the internet, however no matter what I have tried I can't get a loop to work properly when trying to modify to read several xml files in a particular directory. I have experimented with GLOB - $file = glob("directory/*"); foreach ($file as $line) { My screen stays blank and no db insert. I have tried using "scandir", and I still get a blank screen and no db insert. $directory = 'directory'; $files = scandir($directory); foreach ($files as $file) { Is there another method I can use for reading the values contained within my xml files, or can anyone suggest where my code is not right please? I have pasted the entire code below and would be grateful for any assistance provided: <?php $file = file('myfile.xml'); *** I have tried using various array options, and the filenames do load into the array, tested with printr_($file[1]) etc. But the foreach code appears to ignore all files, even the 1st one. *** $servername = "localhost"; $username = "dbuser"; $password = "dbpass"; $db = "dbdb"; $conn = new mysqli($servername, $username, $password, $db); if ($conn->connect_error){ die("Connection failed: ". $conn->connect_error); } $ip; $hostname; $port; $portArray = array(); $portList; $timestamp; foreach($file as $line){ //Get IP Address if (strpos($line, 'addrtype="ipv4"') == TRUE){ preg_match('/addr=".* addrtype/',$line,$results); $ip = implode(" ",$results); $ip = ltrim($ip, 'addr="'); $ip = rtrim($ip, '" addrtype'); print "<br><strong><u>Device</u></strong><br>"; print "IP Address: $ip<br>"; } //Get Hostname if (strpos($line, 'type="PTR"') == TRUE){ preg_match('/name=".*" type/',$line,$results); $hostname = implode(" ",$results); $hostname = ltrim($hostname,'name="'); $hostname = rtrim($hostname, ' type'); $hostname = rtrim($hostname, '"'); print "Hostname: $hostname<br>"; } //Get Ports if (strpos($line, 'portid="') == TRUE){ preg_match('/portid=".*><state/',$line,$results); $port = implode(" ",$results); $port = ltrim($port,'portid="'); $port = rtrim($port, '"><state'); print "Port: $port<br>"; array_push($portArray, $port); } //Add Values to Database if (strpos($line, '/host>') == TRUE){ $timestamp = time(); $mytime = new \DateTimeImmutable('@'.$timestamp); $portList = implode(", ",$portArray); $sql = "insert into _____ (ip,hostname,ports,timestamp) values ('$ip','$hostname','$portList','$timestamp')"; if ($conn->query($sql) === TRUE) { echo "Data Added: $ip - $hostname - $portList - $timestamp <br>"; } else { echo "Error: ".$sql."<br>".$conn->error; } $ip = " "; $hostname = " "; unset($portArray); $portArray = array(); $portList = " "; } } $conn->close(); ?> Thank you!
  5. 1st of all, all the post data you send in the request will be set (is_category, sales, material, salesoffice), so there's no point in testing if it is set, because it will be. if using a post request, just detect if the REQUEST_METHOD is 'POST' you should actually be using a get method request when determining what will be displayed on a page. while I'm pretty sure this has already been covered in a previous thread, you should be using a data-driven design (which is probably what the $column array is part of.) so what are you actually trying to accomplish? include a column/value in the WHERE clause if there is a non-empty value for that input? to do this, you don't need to write out code for every possible combination. regardless of using a data-driven design or conditional logic (once) for each input, you only need code that includes a column/value if there is a non empty value for that input. // using a data-driven design, define permitted WHERE columns and corresponding inputs $where_columns = ['sales_doc_type'=>'sales', 'material'=>'material', 'sales_office'=>'salesoffice']; // array to hold where terms $where_terms = []; // array to hold prepared query input parameters $params = []; // build the where terms foreach($where_columns as $col=>$input) { if($_POST[$input] ==! '') { $where_terms[] = "`$col`=?"; $params[] = "$_POST[$input]"; } } // build the WHERE clause $where = ''; if(!empty($where_terms)) { $where = 'WHERE ' . implode(' AND ',$where_terms); } // build the sql query $sql = "SELECT * FROM billing $where"; // examine the result echo $sql; echo '<pre>'; print_r($params); echo '</pre>';
  6. Continuing on with this thread the solutions was this, it returns a complete set of customer from all 6 pages. However <?php function Get_Customer() { set_time_limit(300); $customers = []; $totalPages = getTotalPages(); $page = 1; while ($page <= $totalPages) { $returnedCustomers = Customers($page); $customers = array_merge($customers, $returnedCustomers); $page++; } include('db_con.php'); //tedst // echo "Total Pages: " . $page . "<br>"; // echo "Total Customers: " . count($customers) . "<br>"; // loop through array of customer foreach ($customers as $customer) { $customer["id"]; $customer["firstname"]; $customer["lastname"]; $customer["fullname"]; $customer["business_name"]; $customer["email"]; $customer["phone"]; $customer["mobile"]; $customer["address"]; $customer["city"]; $customer["state"]; $customer["zip"]; $customer["business_and_full_name"]; $customer["business_then_name"]; if ($customer["business_name"] != "") { $custname = $customer["business_name"]; //Insert customer data into the customer table with syncroID and Company Name $query = "INSERT INTO Customer (SyncroID, CompanyName) VALUES ('" . $customer["id"] . "', '" . $customer["business_name"] ."');"; echo "<br>"; echo $query; echo "<br>"; //$stmt = $pdo->query($query); usleep(5000); } } return $customers; } function Customers($page = 1) { $url = "https://xxxxxxxxxxxxxxxxxxxxxxxxcom/api/v1/customers?sort=business_name&page=" . $page; $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL, $url); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_HTTPGET, true); curl_setopt($cURL, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "Accept: application/json", "Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]); $result = curl_exec($cURL); $data = json_decode($result, true); $customers = $data["customers"]; curl_close($cURL); return $customers; } function getTotalPages() { $url = "https://xxxxxxxxxxxxxxxxxsp.com/api/v1/customers"; $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL, $url); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true); curl_setopt($cURL, CURLOPT_HTTPGET, true); curl_setopt($cURL, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "Accept: application/json", "Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ]); $result = curl_exec($cURL); $data = json_decode($result, true); $totalPages = $data["meta"]["total_pages"]; curl_close($cURL); return $totalPages; } // Get_Customer(); // test /* echo "<br>"; echo $custname; echo " "; echo $customer["address"]; echo " "; echo $customer["city"]; echo ","; echo $customer["state"]; echo " "; echo $customer["zip"]; echo "<b>Customer ID:</b> "; echo " "; echo $customer["id"]; echo "<br>"; echo $query; echo "<br>"; */ //INSERT INTO `Customer` (`SyncroID`, `PrimaryContactID`, `CompanyName`, `Address`, `City`, `State`, `Postcode`, `Country`, `AccountStatus`, `UserName`, `Password_Hash`, `Password_Salt`, `Notes`, `BillingContactID`) //VALUES ('12321', NULL, 'test', NULL, NULL, 'QLD', NULL, 'Australia', 4, NULL, NULL, NULL, NULL, NULL); When I change this line of code to insert into my database //$stmt = $pdo->query($query); to $stmt = $pdo->query($query); I only get the first 80 rows before I get a gateway time out. I tried usleep in for and set_time_limit but they made no difference. Anyone got any ideas. I know the api is getting the full data set so I assume its some memory or time out limit.
  7. Do you want to hire software application developer for your new brand or an existing enterprise with substantial team size? If so, AppStudio is your most reliable IT firm to be considered for its plethora of software-based solutions and dedicated team available to be hired. Our remarkable understanding of consumer expectations and vastly variable business needs are some of the aspects that set us apart from various other mobile app and software development companies in Canada and the USA. To discuss an enterprise application project like CRM, HRM, ERP, and POS, schedule a consultation call with our software engineers and learn more about the project scope and budget.
  8. A couple things. First please put code into code tags using the forum editor. I have fixed your initial post. Second, you say that you get a "blank screen", but you have provided no content of what debugging you have performed. You state you are looking for another way to iterate over the files - but you have already confirmed that the files do load and you can iterate over them - you just aren't getting results. So, rather than finding a different way to get the files (which you have already accomplished), you need to figure out why it is not working. I suspect the issue may be your variable names are causing confusion and you aren't passing what you think you are to the processing code. In example you post with a single file you have this: $file = file('myfile.xml'); In that case $file is an array of the contents of the file. Then you state that you tried thing such as $file = glob("directory/*"); foreach ($file as $line) { or $directory = 'directory'; $files = scandir($directory); foreach ($files as $file) { In the first case $line is a $file (not a line) and in the second case $file (in the foreach loop) is a reference to the file NOT an array of the contents of the file. I'm assuming you are not calling file() on the file reference within your loop. If you had called that first variable $linesAry, which is more accurate to what it is, I think you would have seen this yourself. This should work. Note I don't have a an environment to test on at the moment. So there could be some minor typos\errors. <?php //Make the DB connection $servername = "localhost"; $username = "dbuser"; $password = "dbpass"; $db = "dbdb"; $conn = new mysqli($servername, $username, $password, $db); if ($conn->connect_error){ die("Connection failed: ". $conn->connect_error); } //Get the contents of the directory $directoryStr = "directory/*"; echo "Processing directory: {$directoryStr}<br>\n"; $filesAry = glob($directoryStr); echo "Found: " . count($filesAry) . " files<br><br>\n"; //Iterate over each file foreach ($filesAry as $fileStr) { //Reset the variables for the data being searched $ip = ''; $hostname = ''; $port = ''; $portArray = array(); $portList = ''; $timestamp = ''; //Get content of the file into an array echo "Processing file: {$fileStr}<br>\n"; $linesAry = file($fileStr); //Iterate over each line of text in the file foreach($linesAry as $lineStr) { //Get IP Address if (strpos($lineStr, 'addrtype="ipv4"') == TRUE) { preg_match('/addr=".* addrtype/', $lineStr, $results); $ip = implode(" ",$results); $ip = ltrim($ip, 'addr="'); $ip = rtrim($ip, '" addrtype'); echo "<br><strong><u>Device</u></strong><br>"; echo "IP Address: $ip<br>"; } //Get Hostname if (strpos($lineStr, 'type="PTR"') == TRUE) { preg_match('/name=".*" type/',$lineStr,$results); $hostname = implode(" ",$results); $hostname = ltrim($hostname,'name="'); $hostname = rtrim($hostname, ' type'); $hostname = rtrim($hostname, '"'); echo "Hostname: $hostname<br>"; } //Get Ports if (strpos($lineStr, 'portid="') == TRUE) { preg_match('/portid=".*><state/',$lineStr,$results); $port = implode(" ",$results); $port = ltrim($port,'portid="'); $port = rtrim($port, '"><state'); echo "Port: $port<br>"; array_push($portArray, $port); } //Add Values to Database if (strpos($lineStr, '/host>') == TRUE) { $timestamp = time(); $mytime = new \DateTimeImmutable('@'.$timestamp); $portList = implode(", ",$portArray); $sql = "insert into _____ (ip,hostname,ports,timestamp) values ('$ip', '$hostname', '$portList', '$timestamp')"; if ($conn->query($sql) === TRUE) { echo "Data Added: $ip - $hostname - $portList - $timestamp <br>"; } else { echo "Error: ".$sql."<br>".$conn->error; } } } } //Close the DB connection $conn->close(); ?>
  9. Here is the full code from map2.php: try { // Create a PDO instance $pdo = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Fetch screen data from the database $screenQuery = "SELECT * FROM screen"; $screenStatement = $pdo->query($screenQuery); $screens = $screenStatement->fetchAll(PDO::FETCH_ASSOC); // Check if at least one screen is available if (empty($screens)) { die("No screens available in the database."); } // Get the first screen_id to use for fetching seat data $firstScreenId = $_GET['screen'] ?? ''; $screeningId = $_GET['sgid'] ?? ''; // Fetch seat data based on the first screen_id $seatQuery = "SELECT * FROM seat WHERE screen_id = :screen_id"; $seatStatement = $pdo->prepare($seatQuery); $seatStatement->bindParam(':screen_id', $firstScreenId); $seatStatement->execute(); $seatData = $seatStatement->fetchAll(PDO::FETCH_ASSOC); // Fetch unique rows $uniqueRows = array_unique(array_column($seatData, 'row')); sort($uniqueRows); // Close the PDO connection $listingsQuery = "SELECT m.image, m.title, s.screen_num, date_format(sg.screen_on, '%W, %D %b') as date, TIME_FORMAT(sg.screen_at, '%H:%i') as start_time, CONCAT(m.running_time DIV 60, ' hrs ', m.running_time % 60, ' mins') as running_time FROM screening sg JOIN screen s ON sg.screen_id = s.screen_id JOIN movie m ON sg.movie_id = m.movie_id WHERE sg.screening_id = :screening_id;"; $listingStatement = $pdo->prepare($listingsQuery); $listingStatement->execute(['screening_id' => $screeningId]); $listings = $listingStatement->fetchAll(); $pdo = null; } catch (PDOException $e) { die("Connection failed: " . $e->getMessage()); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/styles.css"> <title>Cinema Seat Map</title> </head> <body id="home"> <header id='map-header'> </header> <div class="listingbook"> <div class="listings"> <?php foreach ($listings as $listing) { ?> <p class="title"><?= htmlspecialchars($listing['title']) ?></p></br> <img class="image" src="images/<?= htmlspecialchars($listing['image']) ?>"><br> <p class="screenNum">Screen <?= htmlspecialchars($listing['screen_num']) ?></p><br> <p class="date"><?= htmlspecialchars($listing['date']) ?>, <?= htmlspecialchars($listing['start_time']) ?></p><br> <p class="running"><?= htmlspecialchars($listing['running_time']) ?></p> <?php } ?> </div> </div> <div id="seat-map"></div> <div id="selected-seat"></div> <div id="total-price">Total Price: £0.00</div> <script> // Declare screeningId as a global variable let screeningId; document.addEventListener("DOMContentLoaded", function () { const seatMap = document.getElementById("seat-map"); const selectedSeat = document.getElementById("selected-seat"); const totalPriceDisplay = document.getElementById("total-price"); let seatPrice; // Declare seatPrice as a global variable // Use PHP data in JavaScript const seatData = <?php echo json_encode($seatData); ?>; const uniqueRows = <?php echo json_encode($uniqueRows); ?>; const screeningId = <?php echo $_GET['sgid']; ?>; // Get screening_id from URL // Fetch the price for the current year fetch('getPrice.php') .then(response => response.json()) .then(data => { seatPrice = data.price; // Assign the value to the global variable seatPrice // Create the seat map uniqueRows.forEach(row => { const rowContainer = document.createElement("div"); rowContainer.className = "row"; const rowSeats = seatData.filter(seat => seat.row === row); rowSeats.forEach(seat => { const seatElement = document.createElement("div"); seatElement.className = "seat"; seatElement.setAttribute("data-seat-id", seat.seat_id); const seatNumber = document.createElement("span"); seatNumber.className = "seat-number"; seatNumber.innerText = `${row}-${seat.seat_number}`; seatElement.appendChild(seatNumber); seatElement.addEventListener("click", () => { seatElement.classList.toggle("selected"); updateSelectedSeat(); }); rowContainer.appendChild(seatElement); }); seatMap.appendChild(rowContainer); }); // Fetch booked seat IDs and update seat map fetch('getBookedSeats.php', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ screeningId }), }) .then(response => { console.log(response); // Log the entire response return response.json(); }) .then(bookedSeats => { console.log(bookedSeats); // Log the booked seats data // Mark booked seats as occupied bookedSeats.forEach(bookedSeatId => { const bookedSeatElement = document.querySelector(`.seat[data-seat-id="${bookedSeatId}"]`); if (bookedSeatElement) { bookedSeatElement.classList.add("occupied"); } }); }) .catch(error => console.error('Error fetching booked seats:', error)); }) .catch(error => console.error('Error fetching price:', error)); function updateSelectedSeat() { const selectedSeats = document.querySelectorAll(".seat.selected"); const seatNumbers = Array.from(selectedSeats).map(seat => { const seatId = seat.getAttribute("data-seat-id"); const selectedSeatData = seatData.find(seat => seat.seat_id == seatId); return `${selectedSeatData.row}-${selectedSeatData.seat_number}`; }); selectedSeat.innerText = `Selected Seats: ${seatNumbers.join(", ")}`; // Calculate and display the total price const totalPrice = seatNumbers.length * seatPrice; totalPriceDisplay.innerText = `Total Price: £${totalPrice.toFixed(2)}`; } function bookSeats() { const selectedSeats = document.querySelectorAll(".seat.selected"); // Check if seats are selected if (selectedSeats.length === 0) { alert("Please select at least one seat."); return; } // Get seat IDs and insert into the database const seatIds = Array.from(selectedSeats).map(seat => seat.getAttribute("data-seat-id")); // Make an AJAX request to insert data into the database fetch('bookSeats.php', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ seatIds, screeningId }), }) .then(response => response.json()) .then(data => { console.log('Booking successful:', data); // You can update the UI or perform other actions here }) .catch(error => console.error('Error booking seats:', error)); // Simulate booking with a delay for visual effect selectedSeats.forEach(seat => { seat.classList.remove("selected"); seat.classList.add("occupied"); }); // Move the updateSelectedSeat function call inside the setTimeout function setTimeout(() => { updateSelectedSeat(); alert("Seats booked successfully!"); }, 500); } // Attach click event listener to the "Book Selected Seats" button const bookSeatsButton = document.getElementById("book-seats-btn"); if (bookSeatsButton) { bookSeatsButton.addEventListener("click", bookSeats); } }); </script> <button id="book-seats-btn">Book Selected Seats</button> </body> </html> I'm not actually sure what I'm supposed to be looking at in the Network console. Been there many times and it gives me what looks like how many milliseconds the code took to run. But here is a screen shot: Thanks
  10. thanks Phill I think the way you've suggested is to run the 'html' code directly from the backend php file via echo which wont work if there are several template designs, however i can see you have seperated the functions which was one of the things i was wondering about Basically there will be 2 files: 1x html / php (frontend) - there may be several 'template' layout designs depending on the users choice 1x php (backend) The frontend will need to display the data from the backend Frontend example <?php require "/functions/data.php"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" name="viewport" content="width=device-width"/> <link rel="stylesheet" type="text/css" href="/resources/css/bootstrap.css"/> </head> <body> <table border="1" cellpadding="1" cellspacing="1"> <tr> <td> <?php data($title); ?> </td> <td><?php data($description); ?></td> <td><?php data($category); ?></td> <td><?php data(image_link); ?></td> </tr> </table> </body> </html> Based on your example i'm unsure how i would retrieve the data bearing in mind i may need just one of the variables not all four and so forth so would need to be able to display/pull them individually So would need to be able to call description / category / image_link / title seperately if needed
  11. Below is an example of a simple responsive web page with a navigation bar and a form containing input fields. This example uses HTML and CSS. You can incorporate this code into your project and customize it further as needed. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Responsive Page with Form</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; box-sizing: border-box; } header { background-color: #333; color: white; text-align: center; padding: 1em; } nav { background-color: #555; overflow: hidden; } nav a { float: left; display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } nav a:hover { background-color: #ddd; color: black; } section { padding: 20px; } form { max-width: 600px; margin: 0 auto; } label { display: block; margin-bottom: 8px; } input, select { width: 100%; padding: 10px; margin-bottom: 16px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } input[type="submit"] { background-color: #4CAF50; color: white; cursor: pointer; } input[type="submit"]:hover { background-color: #45a049; } </style> </head> <body> <header> <h1>Responsive Page</h1> </header> <nav> <a href="#home">Home</a> <a href="#about">About</a> <a href="#contact">Contact</a> </nav> <section> <h2>Contact Us</h2> <form> <label for="name">Name:</label> <input type="text" id="name" name="name" required> <label for="email">Email:</label> <input type="email" id="email" name="email" required> <label for="message">Message:</label> <textarea id="message" name="message" rows="4" required></textarea> <input type="submit" value="Submit"> </form> </section> </body> </html>
  12. Just using the single available table here... SELECT dr.id , device_id , status_id , action_time FROM deployment_register dr JOIN ( SELECT device_id , MAX(action_time) as action_time FROM deployment_register WHERE status_id IN (2, 5) GROUP BY device_id ) latest USING (device_id, action_time); +----+-----------+-----------+---------------------+ | id | device_id | status_id | action_time | +----+-----------+-----------+---------------------+ | 7 | 3 | 5 | 2023-10-07 21:06:45 | +----+-----------+-----------+---------------------+ Subquery to find latest row for each device then join against that.
  13. Accept the incoming data using the appropriate superglobal variables, then use the header function to output a Location header to the desired URL. Your current form is formatted well for this, so first you'd want to change it to give your select box a meaningful name, and remove your hidden input as it is not necessary. $result = mysql_query($sql); echo " <form id='myForm' action='https://mywebsite.com/forum/index.php'> "; echo '<select name="city">'; while ($row = mysql_fetch_array($result)) { echo "<option value='" . $row['field_181'] ."'>" . $row['field_181'] ." - " . $row['COUNT(field_181)'] . " Events </option>"; } echo " </select> "; echo " <br><br> "; echo " <input type='submit'> "; echo " </form> "; Then in your index.php file, you need code to detect if the city input was submitted and if so, issue the redirect with header. if (isset($_GET['city'])){ $url = '/forum/index.php?/'.urlencode($_GET['city']).'-bowling-tournaments/'; header('Location: '.$url); exit; } I don't see much point in doing this though. If you want pretty URLs you should use URL rewriting or a Router library. Otherwise, just use normal query parameters/form posts. Pretty URLs are not necessary, they are just a nice touch.
  14. I tried this - but it yields no results at all - doesnt error erither SELECT dr.id, device_id, status_id, action_time, d.name as deviceName, d.type_id, d.notes, l.name, l.scanning_for, ds.name as deviceStatus from deployment_register dr inner join location l on dr.location_id = l.id inner join device d on dr.device_id = d.id inner join device_status ds on dr.status_id = ds.id JOIN ( SELECT device_id , MAX(action_time) as action_time FROM deployment_register WHERE status_id IN (2, 5) GROUP BY device_id ) latest USING (device_id, action_time) where d.site_id = :site
  15. I have inherited a site with a PHP form that has stopped working. The level of coding is beyond my skills, however I think there may be a simple solution, as the form previously worked fine. Is there a piece of PHP that needs adding to make the submit button at the bottom post the gathered information? Here is the top and bottom of the form with the PHP code. I removed a large part of the form body (it is too big to paste it all) and some HTML text (replaced with 'text removed'). I believe the important code is still present. Any help or advice will be so much appreciated: <?php /** * Template Name: Package * * @package WordPress * @subpackage Twenty_Seventeen * @since 1.0 * @version 1.0 */ get_header(); ?> <div class="wrap"> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <article id="package" class="page"> <div class="entry-content"> <div class="home-wrap side-padding max-width-1000"> <h1 class="page-title-handwriting padding-top-0pt4em"><?php the_title(); ?></h1> </div> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') : ?> <?php // Grab submitted fields $flagStyle = $_POST['flag-style']; $palette = $_POST['palette']; $noOfFlags = $_POST['no-of-flags']; $addBunting = $_POST['add-bunting']; $buntingLocation = $_POST['bunting-location']; $buntingLength = $_POST['length']; $deliveryOption = $_POST['delivery-option']; $buntingRefolding = $_POST['bunting-refolding']; $firstName = $_POST['your-first-name']; $surname = $_POST['your-surname']; $emailAddress = $_POST['your-email']; $phoneNumber = $_POST['your-phone']; $eventDate = $_POST['event-date']; $eventEndDate = $_POST['event-end-date']; $eventPostcode = $_POST['event-postcode']; $deliveryAddress = $_POST['delivery-address']; $deliveryAddressType = $_POST['delivery-address-type']; $deliveryContact = $_POST['event-contact']; $additionalComments = $_POST['additional-comments']; // Send the details by email $headers = "From: Event Flag Hire<hello@eventflaghire.co.uk>\r\n" . 'Reply-To: ' . $emailAddress; $to = "lanx@lanxworld.com"; $to = "studio@eventflaghire.co.uk"; $subject = "PACKAGE QUOTE ENQUIRY FORM"; $message = " CUSTOMER DETAILS\r\n Name: {$firstName} {$surname}\r\nEmail: {$emailAddress}\r\nTelephone: {$phoneNumber}\r\n"; $message .= " FLAG SPECIFICATION\r\n Flag Style: {$flagStyle}\r\nPalette: {$palette}\r\nNumber of flags: {$noOfFlags}\r\n"; $message .= " ADD ADDITIONAL BUNTING?\r\n Would you like to add additional bunting?: {$addBunting}\r\n"; $message .= "Bunting location: {$buntingLocation}\r\n"; if($addBunting == 'Yes'){ $message .= "Bunting length: {$buntingLength}m\r\n"; } $message .= " Bunting refolding required?: {$buntingRefolding}\r\n"; $message .= " DELIVERY\r\n Delivery option: {$deliveryOption}\r"; if($deliveryOption == 'Deliver'){ $message .= " Address Type: {$deliveryAddressType}"; } $message .= " \r\nEVENT DETAILS\r\n Event date: {$eventDate}\r\nEnd date (if event is more than one day): {$eventEndDate}\r\n"; if($deliveryOption == 'Deliver'){ $message .= "\r\nDelivery address: {$deliveryAddress}\r\n{$eventPostcode}\r\nDelivery contact: {$deliveryContact}\r\n"; } $message .= " ADDITIONAL COMMENTS\r\n {$additionalComments}\r\n"; mail($to, $subject, $message, $headers); ?> <div class="home-wrap side-padding max-width-1000" style="text-align:center;"> <h3 class="center padding-top-1em padding-bottom-1em no-text-transform mobile-side-padding text-left"><strong>Thanks for sending your enquiry through for your flag package.</strong></h3> <p>We will send text removed</p> <p>For more decor please <a href="text removed">text removed</a>.</p> </div> <?php else: ?> <form id="package-enquiry-form" method="post" action="<?php the_permalink(); ?>"> <div id="package-loader" class="clearboth flag-strip"> <div class="loader">Loading, please wait&helip;</div> </div> <div id="package-step01" class="clearBoth flag-strip"> <fieldset class="package-section-title side-padding max-width-1000"> <legend><strong>Step 1:</strong> Choose your flag style</legend> <div id="package-step07" class="clearBoth flag-strip"> <fieldset class="package-section-title side-padding max-width-1000"> <legend><strong>Step 7:</strong> Enter your event details</legend> <div class="your-details"> <div class="question-with-note"> <label for="event-date">Date of event*</label> <input type="text" class="datepicker" name="event-date" id="event-date" required> <a class="info-link" href="#">Information</a> <div class="question-note"> <p>Weekly rental period . . .</p> </div> </div> <label for="event-end-date">End date (if event is more than one day)</label> <input type="text" class="datepicker" name="event-end-date" id="event-end-date"> <label for="event-postcode">Delivery postcode*</label> <input type="text" name="event-postcode" id="event-postcode" required> <div class="delivery-specific-field"> <div class="question-with-note"> <label for="delivery-address">Delivery address*</label> <textarea name="delivery-address" id="delivery-address"></textarea> <a class="info-link" href="#">Information</a> <div class="question-note"> <p>This should be an address . . .</p> </div> </div> <label for="event-contact">Contact name text removed</label> <input type="text" name="event-contact" id="event-contact"> </div> <label for="additional-comments">Any additional comments/requirements?</label> <p><small>For example text removed</small></p> <textarea name="additional-comments" id="additional-comments"></textarea> <p>By sending your enquiry you agree to our <a href="/terms-conditions/" target="_blank" rel="noopener">terms and conditions</a>.</p> <input type="submit" value="Send enquiry"> </div> </fieldset> </div> </form> <?php endif; ?> </div> </div><!-- .entry-content --> </article><!-- #post-## --> </main><!-- #main --> </div><!-- #primary --> </div><!-- .wrap --> <?php get_footer(); ``<?php /** * Template Name: Package * * @package WordPress * @subpackage Twenty_Seventeen * @since 1.0 * @version 1.0 */ get_header(); ?> <div class="wrap"> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <article id="package" class="page"> <div class="entry-content"> <div class="home-wrap side-padding max-width-1000"> <h1 class="page-title-handwriting padding-top-0pt4em"><?php the_title(); ?></h1> </div> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') : ?> <?php // Grab submitted fields $flagStyle = $_POST['flag-style']; $palette = $_POST['palette']; $noOfFlags = $_POST['no-of-flags']; $addBunting = $_POST['add-bunting']; $buntingLocation = $_POST['bunting-location']; $buntingLength = $_POST['length']; $deliveryOption = $_POST['delivery-option']; $buntingRefolding = $_POST['bunting-refolding']; $firstName = $_POST['your-first-name']; $surname = $_POST['your-surname']; $emailAddress = $_POST['your-email']; $phoneNumber = $_POST['your-phone']; $eventDate = $_POST['event-date']; $eventEndDate = $_POST['event-end-date']; $eventPostcode = $_POST['event-postcode']; $deliveryAddress = $_POST['delivery-address']; $deliveryAddressType = $_POST['delivery-address-type']; $deliveryContact = $_POST['event-contact']; $additionalComments = $_POST['additional-comments']; // Send the details by email $headers = "From: Event Flag Hire<hello@eventflaghire.co.uk>\r\n" . 'Reply-To: ' . $emailAddress; $to = "lanx@lanxworld.com"; $to = "studio@eventflaghire.co.uk"; $subject = "PACKAGE QUOTE ENQUIRY FORM"; $message = " CUSTOMER DETAILS\r\n Name: {$firstName} {$surname}\r\nEmail: {$emailAddress}\r\nTelephone: {$phoneNumber}\r\n"; $message .= " FLAG SPECIFICATION\r\n Flag Style: {$flagStyle}\r\nPalette: {$palette}\r\nNumber of flags: {$noOfFlags}\r\n"; $message .= " ADD ADDITIONAL BUNTING?\r\n Would you like to add additional bunting?: {$addBunting}\r\n"; $message .= "Bunting location: {$buntingLocation}\r\n"; if($addBunting == 'Yes'){ $message .= "Bunting length: {$buntingLength}m\r\n"; } $message .= " Bunting refolding required?: {$buntingRefolding}\r\n"; $message .= " DELIVERY\r\n Delivery option: {$deliveryOption}\r"; if($deliveryOption == 'Deliver'){ $message .= " Address Type: {$deliveryAddressType}"; } $message .= " \r\nEVENT DETAILS\r\n Event date: {$eventDate}\r\nEnd date (if event is more than one day): {$eventEndDate}\r\n"; if($deliveryOption == 'Deliver'){ $message .= "\r\nDelivery address: {$deliveryAddress}\r\n{$eventPostcode}\r\nDelivery contact: {$deliveryContact}\r\n"; } $message .= " ADDITIONAL COMMENTS\r\n {$additionalComments}\r\n"; mail($to, $subject, $message, $headers); ?> <div class="home-wrap side-padding max-width-1000" style="text-align:center;"> <h3 class="center padding-top-1em padding-bottom-1em no-text-transform mobile-side-padding text-left"><strong>Thanks for sending your enquiry through for your flag package.</strong></h3> <p>We will send text removed</p> <p>For more decor please <a href="text removed">text removed</a>.</p> </div> <?php else: ?> <form id="package-enquiry-form" method="post" action="<?php the_permalink(); ?>"> <div id="package-loader" class="clearboth flag-strip"> <div class="loader">Loading, please wait&helip;</div> </div> <div id="package-step01" class="clearBoth flag-strip"> <fieldset class="package-section-title side-padding max-width-1000"> <legend><strong>Step 1:</strong> Choose your flag style</legend> <label for="event-end-date">End date (if event is more than one day)</label> <input type="text" class="datepicker" name="event-end-date" id="event-end-date"> <label for="event-postcode">Delivery postcode*</label> <input type="text" name="event-postcode" id="event-postcode" required> <div class="delivery-specific-field"> <div class="question-with-note"> <label for="delivery-address">Delivery address*</label> <textarea name="delivery-address" id="delivery-address"></textarea> <a class="info-link" href="#">Information</a> <div class="question-note"> <p>This should be an address . . .</p> </div> </div> <label for="event-contact">Contact name text removed</label> <input type="text" name="event-contact" id="event-contact"> </div> <label for="additional-comments">Any additional comments/requirements?</label> <p><small>For example text removed</small></p> <textarea name="additional-comments" id="additional-comments"></textarea> <p>By sending your enquiry you agree to our <a href="/terms-conditions/" target="_blank" rel="noopener">terms and conditions</a>.</p> <input type="submit" value="Send enquiry"> </div> </fieldset> </div> </form> <?php endif; ?> </div> </div><!-- .entry-content --> </article><!-- #post-## --> </main><!-- #main --> </div><!-- #primary --> </div><!-- .wrap --> <?php get_footer();
  16. nested forms are invalid. what is the form markup? only checked checkboxes are included in the submitted form data. since you are using $row['CODE'] as the checkbox's array name index, that's all you need. you would just get and use the array indexes inside the post method form processing code. the checkboxes are the only valid form fields in the posted code. the rest of that isn't valid, but isn't needed anyways. you should only display the cost on the web page. you should not pass the cost through the web page, where it can be manipulated and be set to anything. you should get the cost in the post method form processing code if you need it. you would only store the cost with the selected items if the cost can change over time and you haven't setup a table to hold the cost history data. you don't need id attributes in the markup unless you are referencing the individual elements in the browser. ids must also be unique, therefore the use of the same id='CODE' and id='COST' inside the loop doesn't work properly. the post method form processing should detect is a post method form was submitted, before referencing any of the form data.
  17. personcreate.php <?php session_start(); ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap demo</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> </head> <body> <div class="container"> <?php include('message.php'); ?> <div class="row"> <div class="col-md-12"> <div class="class"> <div class="class-header"> <h3> Add Info <a href="index.php" class="btn btn-danger float-end">Back</a> </h3> </div> <div class="card-body"> <form action="infoconn.php" method="POST"> <div class="mb-3"> <label>First name</label> <input type="text" firstname="firstname" class="form-control"> </div> <div class="mb-3"> <label>Last name</label> <input type="text" lastname="lastname" class="form-control"> </div> <div class="mb-3"> <label>Date Registered</label> <input type="date" datereg="datereg" class="form-control"> </div> <div class="mb-3"> <label>Address</label> <input type="text" address="address" class="form-control"> </div> <div class="mb-3"> <label>Phone</label> <input type="text" phone="phone" class="form-control"> </div> <div class="mb-3"> <label>Email</label> <input type="email" email="email" class="form-control"> </div> <div class="mb-3"> <button type="submit" name="save_info" class="btn btn-primary">Save Info</button> </div> </form> </div> </div> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> </body> </html> infoconn.php <?php session_start(); require 'dbconn.php'; if(isset($_POST['save_info'])) { $firstname = mysqli_real_escape_string($con, $_POST['firstname']); $lastname = mysqli_real_escape_string($con, $_POST['lastname']); $datereg = mysqli_real_escape_string($con, $_POST['datereg']); $address = mysqli_real_escape_string($con, $_POST['address']); $phone = mysqli_real_escape_string($con, $_POST['phone']); $email = mysqli_real_escape_string($con, $_POST['email']); $query = "INSERT INTO persondetails (firstname,lastname,datereg,address,phone,email) VALUES ('$firstname', '$lastname', '$datereg', '$address', '$phone', '$email')"; $query_run = mysqli_query($con, $query); if($query_run) { $_SESSION['message'] = "Info Added"; header("Location: personcreate.php"); exit(0); } else { $_SESSION['message'] = "Failed to Add"; header("Location: personcreate.php"); exit(0); } } ?>
  18. I have quite a long query that is supposed to select the highest id to get the row. SELECT MAX(dr.id), device_id, status_id, action_time, d.name as deviceName, d.type_id, d.notes, l.name, l.scanning_for, ds.name as deviceStatus from deployment_register dr inner join location l on dr.location_id = l.id inner join device d on dr.device_id = d.id inner join device_status ds on dr.status_id = ds.id where dr.status_id = 2 or dr.status_id = 5 and d.site_id = 20 group by dr.device_id The table structure is CREATE TABLE `deployment_register` ( `id` int(11) NOT NULL, `device_id` int(11) NOT NULL, `status_id` int(11) NOT NULL, `location_id` int(11) NOT NULL, `action_time` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -- Dumping data for table `deployment_register` -- INSERT INTO `deployment_register` (`id`, `device_id`, `status_id`, `location_id`, `action_time`) VALUES (1, 3, 2, 1, '2023-10-06 21:06:45'), (7, 3, 5, 1, '2023-10-07 21:06:45'); ALTER TABLE `deployment_register` ADD PRIMARY KEY (`id`); The site table CREATE TABLE `event_site` ( `id` int(11) NOT NULL, `name` varchar(200) NOT NULL, `notes` varchar(2000) NOT NULL, `job_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; INSERT INTO `event_site` (`id`, `name`, `notes`, `job_id`) VALUES (1, 'qwef', 'efef', 19), (2, 'This', 'Note', 20); The query is selecting the first row when it should be selecting the second. Any obvious issues here?
  19. Hi there, I have full error reporting on in my test environment but is not producing any error reports. I've tried a VARDUMP and comes back with; array(34) { ["id"]=> string(3) "151" ["learning_opportunities"]=> string(2) "No" ["contact_for_other_purposes"]=> string(5) "Phone" ["empowering_communities"]=> string(2) "No" ["empowering_communities_name"]=> string(22) "David Testffffffffffff" ["empowering_communities_sign"]=> string(9) "Dave Test" ["empowering_communities_date"]=> string(10) "2023-10-10" ["participant_enrolled_onto"]=> string(2) "No" ["participant_moved_another_provider"]=> string(2) "No" ["participant_eligible_free_school"]=> string(2) "No" ["british_passport"]=> string(3) "Yes" ["eec_passport"]=> string(2) "No" ["euss_via_home"]=> string(2) "No" ["preferred_evidence"]=> string(3) "Yes" ["provide_preferred_evidence"]=> string(9) "345345353" ["option_adoption_vertificate"]=> string(0) "" ["option_driving_licence"]=> string(0) "" ["option_non_eu_passport"]=> string(0) "" ["option_biometric_immigration"]=> string(0) "" ["option_current_immigration"]=> string(0) "" ["option_marriage_civil_partnership"]=> string(0) "" ["option_other_evidence"]=> string(0) "" ["option_nine"]=> string(35) "Utility Bill/Phone Bill/Council Tax" ["details_evidence_provided"]=> string(7) "sdghsdf" ["dwp_job_centre_letter"]=> string(0) "" ["confirmation_relevant_organisation"]=> string(0) "" ["self_certification_evidence"]=> string(3) "fff" ["partcipant_told_support"]=> string(3) "Yes" ["participant_file_completed_remotly"]=> string(2) "No" ["declaration_name_please_print"]=> string(7) "gdfgsdg" ["declaration_job_title"]=> string(8) "sdfgsdfg" ["declaration_organisation"]=> string(8) "sdfgsdfg" ["declaration_signature_date"]=> string(10) "2023-10-10" ["declaration_signature"]=> string(6) "dfgshf" } string(69) "No rows updated. Possible reasons: No changes detected or invalid ID." Cheers, ED.
  20. <?php // Database connection details $servername = "localhost"; $username = "root"; $password = ""; $dbname = "invoice"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Check if the form is submitted if ($_SERVER["REQUEST_METHOD"] === "POST") { // Sanitize and retrieve form data $grNumber = isset($_POST["gr_number"]) ? intval($_POST["gr_number"]) : 0; $libraryFee = isset($_POST["library_fee"]) ? floatval($_POST["library_fee"]) : 0.0; $beadsMakingFee = isset($_POST["beads_making_fee"]) ? floatval($_POST["beads_making_fee"]) : 0.0; $tuitionFee = isset($_POST["tuition_fee"]) ? floatval($_POST["tuition_fee"]) : 0.0; $boardingFee = isset($_POST["boarding_fee"]) ? floatval($_POST["boarding_fee"]) : 0.0; $maintenanceFee = isset($_POST["maintenance_fee"]) ? floatval($_POST["maintenance_fee"]) : 0.0; $computerFee = isset($_POST["computer_fee"]) ? floatval($_POST["computer_fee"]) : 0.0; $sportsFee = isset($_POST["sports_fee"]) ? floatval($_POST["sports_fee"]) : 0.0; $feedingArrears = isset($_POST["feeding_arrears"]) ? floatval($_POST["feeding_arrears"]) : 0.0; $transportationArrears = isset($_POST["transportation_arrears"]) ? floatval($_POST["transportation_arrears"]) : 0.0; $lastTermArrears = isset($_POST["last_term_arrears"]) ? floatval($_POST["last_term_arrears"]) : 0.0; $totalAmount = isset($_POST["total_amount"]) ? floatval($_POST["total_amount"]) : 0.0; $date=$_POST['date']; $date=date('Y-m-d',strtotime($date)); $status = isset($_POST["status"]) ? $_POST["status"] : ''; // Calculate total amount $paidAmount = $libraryFee + $beadsMakingFee + $tuitionFee + $boardingFee + $maintenanceFee + $computerFee + $sportsFee + $feedingArrears + $transportationArrears; // Prepare and execute the SQL query $insertQuery = $conn->prepare("INSERT INTO fees (gr_number, library_fee, beads_making_fee, tuition_fee, boarding_fee, maintenance_fee, computer_fee, sports_fee, feeding_arrears, transportation_arrears, last_term_arrears, total_amount, paid_amount, date, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $insertQuery->bind_param("iddddddddddddds", $grNumber, $libraryFee, $beadsMakingFee, $tuitionFee, $boardingFee, $maintenanceFee, $computerFee, $sportsFee, $feedingArrears, $transportationArrears, $lastTermArrears, $totalAmount, $paidAmount, $date, $status); if ($insertQuery->execute()) { // Data inserted successfully $insertQuery->close(); header("Location: schoolfees.php"); exit(); // Make sure to exit after a header redirect } else { // Log the error and provide a user-friendly message die("Error inserting data: " . $conn->error); } } // Retrieve existing fees data from the database $selectQuery = "SELECT * FROM fees"; $result = $conn->query($selectQuery); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>GTUC Job Board - Dashboard</title> <meta name="description" content="Online Job Management / Job Portal" /> <meta name="keywords" content="job, work, resume, applicants, application, employee, employer, hire, hiring, human resource management, hr, online job management, company, worker, career, recruiting, recruitment" /> <meta name="author" content="BwireSoft"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta property="og:image" content="http://your_actual_link/images/banner.jpg" /> <meta property="og:image:secure_url" content="https://your_actual_link/images/banner.jpg" /> <meta property="og:image:type" content="image/jpeg" /> <meta property="og:image:width" content="500" /> <meta property="og:image:height" content="300" /> <meta property="og:image:alt" content="Bwire Jobs"> <link rel="shortcut icon" href="../images/ico/favicon.png"> <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css" media="screen"> <link href="../css/animate.css" rel="stylesheet"> <link href="../css/main.css" rel="stylesheet"> <link href="../css/component.css" rel="stylesheet"> <link rel="stylesheet" href="../icons/linearicons/style.css"> <link rel="stylesheet" href="../icons/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="../icons/simple-line-icons/css/simple-line-icons.css"> <link rel="stylesheet" href="../icons/ionicons/css/ionicons.css"> <link rel="stylesheet" href="../icons/pe-icon-7-stroke/css/pe-icon-7-stroke.css"> <link rel="stylesheet" href="../icons/rivolicons/style.css"> <link rel="stylesheet" href="../icons/flaticon-line-icon-set/flaticon-line-icon-set.css"> <link rel="stylesheet" href="../icons/flaticon-streamline-outline/flaticon-streamline-outline.css"> <link rel="stylesheet" href="../icons/flaticon-thick-icons/flaticon-thick.css"> <link rel="stylesheet" href="../icons/flaticon-ventures/flaticon-ventures.css"> <link href="../css/style.css" rel="stylesheet"> </head> <style> .autofit2 { height: 80px; width: 100px; object-fit: cover; } .statistic-box { background-color: #fff; padding: 20px; margin-bottom: 20px; text-align: center; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .statistic-box i { font-size: 48px; color: #002e69; } .counter-number { font-size: 24px; font-weight: bold; color: #333; margin-top: 10px; } .statistic-box h5 { font-size: 18px; margin-top: 10px; color: #666; } .statistic-box a { display: block; margin-top: 15px; color: #002e69; text-decoration: none; } /* Responsive Styles */ @media (max-width: 768px) { .statistic-box { padding: 15px; } .statistic-box i { font-size: 36px; } .counter-number { font-size: 18px; } .statistic-box h5 { font-size: 16px; } } /* Add your custom table styles here */ table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { border: 1px solid #ddd; padding: 8px; text-align: left; } th { background-color: #4CAF50; color: white; } tr:hover { background-color: #f5f5f5; } /* Add your custom button styles here */ button { background-color: #4CAF50; color: #fff; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; } button:hover { background-color: #45a049; } .action-buttons button { margin-right: 10px; /* Adjust the margin as needed */ } .add-fees-form { max-width: 800px; margin: 0 auto; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } .add-fees-form label { display: block; margin-bottom: 5px; font-weight: bold; color: #000000; } .add-fees-form input, .add-fees-form select, .add-fees-form textarea { width: 100%; padding: 8px; margin-bottom: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; } .add-fees-form textarea { resize: vertical; } .add-fees-form button { background-color: #4CAF50; color: #fff; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } .add-fees-form button:hover { background-color: #45a049; } /* Responsive Styles */ @media (max-width: 768px) { .add-fees-form { width: 100%; } .add-fees-form div { width: 100%; } } /* Style for Edit Student Modal */ #editTeacherModal { color: #000; } #editTeacherModal .modal-content { background-color: #fff; border-radius: 10px; } #editTeacherModal .modal-header { background-color: #4CAF50; color: #fff; border-radius: 10px 10px 0 0; } #editTeacherModal .modal-body { padding: 20px; } #editTeacherModal label { font-weight: bold; color: #000; } #editTeacherModal input, #editTeacherModal select, #editTeacherModal textarea { width: 80%; padding: 8px; margin-bottom: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; } #editTeacherModal button { background-color: #4CAF50; color: #fff; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } #editTeacherModal button:hover { background-color: #45a049; } /* Style for View Student Modal */ #viewTeacherModal { color: #000; } #viewTeacherModal .modal-content { background-color: #fff; border-radius: 10px; } #viewTeacherModal .modal-header { background-color: #4CAF50; color: #fff; border-radius: 10px 10px 0 0; } #viewTeacherModal .modal-body { padding: 20px; } #viewTeacherModal label { font-weight: bold; color: #000; } #viewTeacherModal p { font-size: 14px; color: #333; } #viewTeacherModal button { background-color: #4CAF50; color: #fff; padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } #viewTeacherModal button:hover { background-color: #45a049; } </style> <body class="not-transparent-header"> <div class="container-wrapper"> <header id="header"> <nav class="navbar navbar-default navbar-fixed-top navbar-sticky-function"> <div class="container"> <div class="logo-wrapper"> <div class="logo"> <a href="../"><img src="../images/logo.png" alt="Logo" /></a> </div> </div> <div id="navbar" class="navbar-nav-wrapper navbar-arrow"> <ul class="nav navbar-nav" id="responsive-menu"> <li><a href=""></a></li> </ul> </div> <div class="nav-mini-wrapper"> <ul class="nav-mini sign-in"> <li><a href="logout.php">logout</a></li> <li><a href="my_account.php">Profile</a></li> </ul> </div> </div> <div id="slicknav-mobile"></div> </nav> </header> <div class="main-wrapper"> <div class="breadcrumb-wrapper"> <div class="container"> <ol class="breadcrumb-list booking-step"> <li><a href="../">Home</a></li> <li><span>Class</span></li> </ol> </div> </div> <div class="admin-container-wrapper"> <div class="container"> <div class="GridLex-gap-15-wrappper"> <div class="GridLex-grid-noGutter-equalHeight"> <div class="GridLex-col-3_sm-4_xs-12"> <div class="admin-sidebar"> <div class="admin-user-item"> <div class="image"> <center> <!-- Profile Image --> <img class='img-circle autofit2' src='../images/default.jpg' title='' alt='image' /> </center> </div> <br> <h4>Username</h4> <p class="user-role"></p> </div> <div class="admin-user-action text-center"> <a href="my_account.php" class=" fa fa-user btn btn-primary btn-sm btn-inverse ">View My Account</a> </div> <ul class="admin-user-menu clearfix"> <li> <a href="dashboard.php"><i class="fa fa-tachometer"></i>Dashboard</a> </li> <li > <a href="class.php"><i class="fa fa-building"></i> Class</a> </li> <li> <a href="term.php"><i class="fa fa-building"></i> Term</a> </li> <li > <a href="students.php"><i class="fa fa-building"></i> Students</a> </li> <li > <a href="teachers.php"><i class="fa fa-users"></i> Teachers</a> </li> <li class="active"> <a href="schoolfees.php"><i class="fa fa-folder-open"></i> School Fees</a> </li> <li> <a href="salary.php"><i class="fa fa-folder-open"></i> Salary</a> </li> <li> <a href="change-password.php"><i class="fa fa-key"></i> Change Password</a> </li> <li> <a href="logout.php"><i class="fa fa-sign-out"></i> Logout</a> </li> </ul> </div> </div> <div class="GridLex-col-9_sm-8_xs-12"> <div class="admin-content-wrapper"> <div class="admin-section-title" style="display: flex; justify-content: space-between; align-items: center;"> <h3>Fees</h3> <p style="margin-left: auto;">Today's date: <span class="text-primary">2023-12-29</span></p> </div> <!-- Form to add teachers --> <form class="add-fees-form" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>"> <div style="display: flex; justify-content: space-between; gap: 10px;"> <!-- First Column of Form Fields --> <div style="width: 30%;"> <label for="gr_number">GR Number:</label> <input type="text" name="gr_number" required> <label for="library_fee">Library Fee:</label> <input type="number" name="library_fee" required> <label for="beads_making_fee">Beads Making Fee:</label> <input type="number" name="beads_making_fee" required> </div> <!-- Second Column of Form Fields --> <div style="width: 30%;"> <label for="tuition_fee">Tuition Fee:</label> <input type="number" name="tuition_fee" required> <label for="boarding_fee">Boarding Fee:</label> <input type="number" name="boarding_fee" required> <label for="maintenance_fee">Maintenance Fee:</label> <input type="number" name="maintenance_fee" required> </div> <!-- Third Column of Form Fields --> <div style="width: 30%;"> <label for="computer_fee">Computer Fee:</label> <input type="number" name="computer_fee" required> <label for="sports_fee">Sports Fee:</label> <input type="number" name="sports_fee" required> <label for="feeding_arrears">Feeding Arrears:</label> <input type="number" name="feeding_arrears" required> </div> </div> <!-- Additional Row for Transportation and Last Term Arrears --> <div style="display: flex; justify-content: space-between; gap: 10px; margin-top: 10px;"> <!-- Fourth Column of Form Fields --> <div style="width: 30%;"> <label for="transportation_arrears">Transportation Arrears:</label> <input type="number" name="transportation_arrears" required> </div> <!-- Fifth Column of Form Fields --> <div style="width: 30%;"> <label for="last_term_arrears">Last Term Arrears:</label> <input type="number" name="last_term_arrears" required> </div> </div> <!-- Total Amount, Date Paid, and Status Fields --> <div style="display: flex; justify-content: space-between; gap: 10px; margin-top: 10px;"> <!-- Sixth Column of Form Fields --> <div style="width: 30%;"> <label for="total_amount">Total Amount:</label> <input type="number" name="total_amount" required> </div> <!-- Seventh Column of Form Fields --> <div style="width: 30%;"> <label for="date_paid">Date Paid:</label> <input type="date" name="date"> </div> <!-- Eighth Column of Form Fields --> <div style="width: 30%;"> <label for="status">Status:</label> <select name="status" required> <option value="paid">Paid</option> <option value="part">Part</option> <option value="unpaid">Unpaid</option> </select> </div> </div> <!-- Submit Button --> <button type="submit">Add Fees</button> </form> <br> <div class="row"> <div class="col-md-12"> <div class="table-responsive"> <table class="table table-bordered table-responsive"> <thead> <tr> <th>GR Number</th> <th>Library Fee</th> <th>Beads Making Fee</th> <th>Tuition Fee</th> <th>Boarding Fee</th> <th>Maintenance Fee</th> <th>Computer Fee</th> <th>Sports Fee</th> <th>Feeding Arrears</th> <th>Transportation Arrears</th> <th>Last Term Arrears</th> <th>Total Amount</th> <th>Date Paid</th> <th>Balance</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php while ($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td>" . $row["gr_number"] . "</td>"; echo "<td>" . $row["library_fee"] . "</td>"; echo "<td>" . $row["beads_making_fee"] . "</td>"; echo "<td>" . $row["tuition_fee"] . "</td>"; echo "<td>" . $row["boarding_fee"] . "</td>"; echo "<td>" . $row["maintenance_fee"] . "</td>"; echo "<td>" . $row["computer_fee"] . "</td>"; echo "<td>" . $row["sports_fee"] . "</td>"; echo "<td>" . $row["feeding_arrears"] . "</td>"; echo "<td>" . $row["transportation_arrears"] . "</td>"; echo "<td>" . $row["last_term_arrears"] . "</td>"; echo "<td>" . $row["total_amount"] . "</td>"; echo "<td>" . $row["date"] . "</td>"; $balance = $row["total_amount"] + $row["last_term_arrears"] - $row["paid_amount"]; echo "<td>" . $balance . "</td>"; echo "<td>"; $totalDue = $row["total_amount"] + $row["last_term_arrears"]; if ($totalDue == $row["paid_amount"]) { echo "Paid"; } elseif ($totalDue > $row["paid_amount"] && $row["paid_amount"] != 0) { echo "Part Payment"; } elseif ($totalDue > $row["paid_amount"] && $row["paid_amount"] == 0) { echo "Unpaid"; } else { // Handle any other cases or leave it empty echo "Unknown"; } echo "</td>"; // Merge Action column echo "<td>"; echo "<button onclick='viewFees(\"" . $row["gr_number"] . "\", \"" . $row["library_fee"] . "\", \"" . $row["beads_making_fee"] . "\", \"" . $row["tuition_fee"] . "\", \"" . $row["boarding_fee"] . "\", \"" . $row["maintenance_fee"] . "\", \"" . $row["computer_fee"] . "\", \"" . $row["sports_fee"] . "\", \"" . $row["feeding_arrears"] . "\", \"" . $row["transportation_arrears"] . "\", \"" . $row["last_term_arrears"] . "\", \"" . $row["total_amount"] . "\", \"" . $row["date"] . "\", \"" . $row["status"] . "\")'>View</button>"; echo "<button onclick='editFees(\"" . $row["gr_number"] . "\", \"" . $row["library_fee"] . "\", \"" . $row["beads_making_fee"] . "\", \"" . $row["tuition_fee"] . "\", \"" . $row["boarding_fee"] . "\", \"" . $row["maintenance_fee"] . "\", \"" . $row["computer_fee"] . "\", \"" . $row["sports_fee"] . "\", \"" . $row["feeding_arrears"] . "\", \"" . $row["transportation_arrears"] . "\", \"" . $row["last_term_arrears"] . "\", \"" . $row["total_amount"] . "\", \"" . $row["date"] . "\", \"" . $row["status"] . "\")'>Edit</button>"; echo "<form style='display:inline;' method='post' action='delete_fees.php'>"; echo "<input type='hidden' name='fees_id' value='" . $row["gr_number"] . "'>"; echo "<button type='submit' class='btn btn-danger'>Delete</button>"; echo "</form>"; echo "</td>"; echo "</tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div id="back-to-top"> <a href="#"><i class="ion-ios-arrow-up"></i></a> </div> <!-- Edit Fees Modal --> <div class="modal fade" id="editFeesModal" tabindex="-1" role="dialog" aria-labelledby="editFeesModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="editFeesModalLabel">Edit Fees Details</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <!-- Your form for editing fees --> <form class="edit-fees-form" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" id="editFeesForm"> <!-- Fields for editing fees --> <div class="mb-3"> <label for="editGrNumber" class="form-label">GR Number:</label> <input type="text" class="form-control" id="editGrNumber" name="editGrNumber" required> </div> <div class="mb-3"> <label for="editLibraryFee" class="form-label">Library Fee:</label> <input type="number" class="form-control" id="editLibraryFee" name="editLibraryFee" required> </div> <div class="mb-3"> <label for="editBeadsMakingFee" class="form-label">Beads Making Fee:</label> <input type="number" class="form-control" id="editBeadsMakingFee" name="editBeadsMakingFee" required> </div> <div class="mb-3"> <label for="editTuitionFee" class="form-label">Tuition Fee:</label> <input type="number" class="form-control" id="editTuitionFee" name="editTuitionFee" required> </div> <div class="mb-3"> <label for="editBoardingFee" class="form-label">Boarding Fee:</label> <input type="number" class="form-control" id="editBoardingFee" name="editBoardingFee" required> </div> <div class="mb-3"> <label for="editMaintenanceFee" class="form-label">Maintenance Fee:</label> <input type="number" class="form-control" id="editMaintenanceFee" name="editMaintenanceFee" required> </div> <div class="mb-3"> <label for="editComputerFee" class="form-label">Computer Fee:</label> <input type="number" class="form-control" id="editComputerFee" name="editComputerFee" required> </div> <div class="mb-3"> <label for="editSportsFee" class="form-label">Sports Fee:</label> <input type="number" class="form-control" id="editSportsFee" name="editSportsFee" required> </div> <div class="mb-3"> <label for="editFeedingArrears" class="form-label">Feeding Arrears:</label> <input type="number" class="form-control" id="editFeedingArrears" name="editFeedingArrears" required> </div> <div class="mb-3"> <label for="editTransportationArrears" class="form-label">Transportation Arrears:</label> <input type="number" class="form-control" id="editTransportationArrears" name="editTransportationArrears" required> </div> <div class="mb-3"> <label for="editLastTermArrears" class="form-label">Last Term Arrears:</label> <input type="number" class="form-control" id="editLastTermArrears" name="editLastTermArrears" required> </div> <div class="mb-3"> <label for="editTotalAmount" class="form-label">Total Amount:</label> <input type="number" class="form-control" id="editTotalAmount" name="editTotalAmount" required> </div> <div class="mb-3"> <label for="editDatePaid" class="form-label">Date Paid:</label> <input type="date" class="form-control" id="editDatePaid" name="editDatePaid"> </div> <div class="mb-3"> <label for="editStatus" class="form-label">Status:</label> <select class="form-select" id="editStatus" name="editStatus" required> <option value="paid">Paid</option> <option value="part">Part</option> <option value="unpaid">Unpaid</option> </select> </div> <!-- Add other form fields as needed --> <!-- ... --> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="submitEditFeesForm()">Save Changes</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- JavaScript to handle Edit Fees Modal --> <script> function openEditFeesModal(grNumber, libraryFee, beadsMakingFee, tuitionFee, boardingFee, maintenanceFee, computerFee, sportsFee, feedingArrears, transportationArrears, lastTermArrears, totalAmount, datePaid, status) { // Set values in the modal fields document.getElementById('editGrNumber').value = grNumber; document.getElementById('editLibraryFee').value = libraryFee; document.getElementById('editBeadsMakingFee').value = beadsMakingFee; document.getElementById('editTuitionFee').value = tuitionFee; document.getElementById('editBoardingFee').value = boardingFee; document.getElementById('editMaintenanceFee').value = maintenanceFee; document.getElementById('editComputerFee').value = computerFee; document.getElementById('editSportsFee').value = sportsFee; document.getElementById('editFeedingArrears').value = feedingArrears; document.getElementById('editTransportationArrears').value = transportationArrears; document.getElementById('editLastTermArrears').value = lastTermArrears; document.getElementById('editTotalAmount').value = totalAmount; document.getElementById('editDatePaid').value = datePaid; document.getElementById('editStatus').value = status; // Show the Edit Fees modal $('#editFeesModal').modal('show'); } function submitEditFeesForm() { // Add your logic to submit the form using AJAX or other methods // For now, let's just close the modal $('#editFeesModal').modal('hide'); } </script> <script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="../js/jquery-migrate-1.2.1.min.js"></script> <script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="../js/bootstrap-modalmanager.js"></script> <script type="text/javascript" src="../js/bootstrap-modal.js"></script> <script type="text/javascript" src="../js/smoothscroll.js"></script> <script type="text/javascript" src="../js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="../js/jquery.waypoints.min.js"></script> <script type="text/javascript" src="../js/wow.min.js"></script> <script type="text/javascript" src="../js/jquery.counterup.min.js"></script> <script type="text/javascript" src="../js/jquery.validate.min.js"></script> <script type="text/javascript" src="../js/jquery.stellar.min.js"></script> <script type="text/javascript" src="../js/jquery.magnific-popup.min.js"></script> <script type="text/javascript" src="../js/owl.carousel.min.js"></script> <script type="text/javascript" src="../js/wow.min.js"></script> <script type="text/javascript" src="../js/masonry.pkgd.min.js"></script> <script type="text/javascript" src="../js/jquery.filterizr.min.js"></script> <script type="text/javascript" src="../js/smoothscroll.js"></script> <script type="text/javascript" src="../js/jquery.countdown.min.js"></script> <script type="text/javascript" src="../js/script.js"></script> <script type="text/javascript" src="../js/handlebars.min.js"></script> <script type="text/javascript" src="../js/jquery.countimator.js"></script> <script type="text/javascript" src="../js/jquery.countimator.wheel.js"></script> <script type="text/javascript" src="../js/slick.min.js"></script> <script type="text/javascript" src="../js/easy-ticker.js"></script> <script type="text/javascript" src="../js/jquery.introLoader.min.js"></script> <script type="text/javascript" src="../js/jquery.responsivegrid.js"></script> <script type="text/javascript" src="../js/customs.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <?php // Close the database connection $conn->close(); ?> </body> </html>
  21. HI All, Sorry, i have been workign with this query and its not actually doing what i need i dont think. After correcting my wrong site faux pas - when using it, it seems to be showing me rows that it shouldnt. SELECT dr.id, device_id, status_id, action_time, d.name as deviceName, d.type_id, d.notes, l.name, l.scanning_for, ds.name as deviceStatus from deployment_register dr inner join location l on dr.location_id = l.id inner join device d on dr.device_id = d.id inner join device_status ds on dr.status_id = ds.id JOIN ( SELECT device_id , MAX(action_time) as action_time FROM deployment_register WHERE status_id IN (2, 5) GROUP BY device_id ) latest USING (device_id, action_time) where d.site_id = :site"; the register table CREATE TABLE `deployment_register` ( `id` int(11) NOT NULL, `device_id` int(11) NOT NULL, `status_id` int(11) NOT NULL, `location_id` int(11) NOT NULL, `action_time` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; INSERT INTO `deployment_register` (`id`, `device_id`, `status_id`, `location_id`, `action_time`) VALUES (1, 3, 2, 1, '2023-10-06 21:06:45'), (7, 3, 5, 1, '2023-10-07 21:06:45'), (8, 1, 5, 1, '2023-10-07 21:06:45'), (9, 2, 2, 1, '2023-10-09 20:08:18'), (10, 6, 2, 2, '2023-10-09 20:08:26'), (11, 5, 2, 2, '2023-10-09 20:08:31'), (12, 5, 2, 2, '2023-10-09 20:08:44'), (17, 3, 3, 1, '2023-10-10 19:39:58'), (18, 3, 3, 1, '2023-10-10 19:51:59'); ALTER TABLE `deployment_register` ADD PRIMARY KEY (`id`); ALTER TABLE `deployment_register` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; COMMIT; as you can see id 18 has a status id of 3. I only want to see the row that has the highest action_date where the status is 2,5. It is not showing row 18 in the results of the query but insead row 7. I have clearly got the query wrong and would really appreciate a pointer with it. I hope i have explained this well enough, if not please shout and i will try and do a better job of explaining what i am trying to achieve. Thanks as always.
  22. Hello. So I decided to build a employee dashboard area for the company I work at. i followed some tutorials on setting up a log in system, it works perfectly. I ended up adding a few more fields in the registration for the user profile. The inputs get sent to the database. I can recall the username through the session. i would like to be able to display first name last name and phone number that are current stored in the database. I have spent waaay too long trying to figure this out on my own and its driving me insane to the point i am willing to ask for help here. Any help would be appriciated! registration.php <!DOCTYPE html> <html> <head> <title>KTS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.3/css/mdb.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <nav class="navbar fixed-top navbar-expand-sm " style="background-color: #f1f1f1"> <button class="navbar-toggler custom-toggler" type="button" data-toggle="collapse" data-target="#nav-content" aria-controls="nav-content" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="g-ytsubscribe" data-channelid="UCds5d45OsiuCkxSKjBy9UMQ" data-layout="full" data-theme="light" data-count="hidden"></div> <!-- Links --> <div class="collapse navbar-collapse" id="nav-content"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link navlinkfont" href="http://lnmco.atspace.cc/lnm/Khris/producers.html">To Do</a> </li> <li class="nav-item"> <a class="nav-link navlinkfont" href="http://lnmco.atspace.cc/lnm/Khris">Maintenance Logs</a> </li> <li class="nav-item"> <a class="nav-link navlinkfont active" href="http://lnmco.atspace.cc/lnm/Khris/soundcloud.html"></a> </li> </ul> </div> </nav> <br> <br> <br> <br> <div class="card" style="background-color: grey"> <?php require('db.php'); // When form submitted, insert values into the database. if (isset($_REQUEST['username'])) { // removes backslashes $username = stripslashes($_REQUEST['username']); //escapes special characters in a string $username = mysqli_real_escape_string($con, $username); $email = stripslashes($_REQUEST['email']); $email = mysqli_real_escape_string($con, $email); $password = stripslashes($_REQUEST['password']); $password = mysqli_real_escape_string($con, $password); $create_datetime = date("Y-m-d H:i:s"); $firstName = stripslashes($_REQUEST['firstName']); //escapes special characters in a string $firstName = mysqli_real_escape_string($con, $firstName); $lastName = stripslashes($_REQUEST['lastName']); $lastName = mysqli_real_escape_string($con, $lastName); $phone = stripslashes($_REQUEST['phone']); $phone = mysqli_real_escape_string($con, $phone); $query = "INSERT into `users` (username, password, email, create_datetime, firstName, lastName, phone) VALUES ('$username', '" . md5($password) . "', '$email', '$create_datetime', '$firstName', '$lastName', '$phone')"; $result = mysqli_query($con, $query); if ($result) { echo "<div class='form'> <h3>You are registered successfully.</h3><br/> <p class='link'>Click here to <a href='login.php'>Login</a></p> </div>"; } else { echo "<div class='form'> <h3>Required fields are missing.</h3><br/> <p class='link'>Click here to <a href='registration.php'>registration</a> again.</p> </div>"; } } else { ?> <form class="form" action="" method="post"> <h1 class="login-title">Registration</h1> <input type="text" class="login-input" name="username" placeholder="Username" required /> <input type="text" class="login-input" name="email" placeholder="Email Adress"> <input type="password" class="login-input" name="password" placeholder="Password"> <input type="text" class="login-input" name="firstName" placeholder="First Name" required /> <input type="text" class="login-input" name="lastName" placeholder="Last Name"> <input type="text" class="login-input" name="phone" placeholder="Phone Number" required /> <input type="submit" name="submit" value="Register" class="login-button"> <p class="link">Already have an account? <a href="login.php">Login here</a></p> </form> <?php } ?> </div> <script type="text/javascript" src="js/script.js"></script> </body> </html> login.php <?php session_start(); ?> <!DOCTYPE html> <html> <head> <title>KTS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.3/css/mdb.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <link rel="stylesheet" type="text/css" href="css/youtube.css"> </head> <body> <nav class="navbar fixed-top navbar-expand-sm " style="background-color: #f1f1f1"> <button class="navbar-toggler custom-toggler" type="button" data-toggle="collapse" data-target="#nav-content" aria-controls="nav-content" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="g-ytsubscribe" data-channelid="UCds5d45OsiuCkxSKjBy9UMQ" data-layout="full" data-theme="light" data-count="hidden"></div> <!-- Links --> <div class="collapse navbar-collapse" id="nav-content"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link navlinkfont" href="http://lnmco.atspace.cc/lnm/Khris/producers.html">To Do</a> </li> <li class="nav-item"> <a class="nav-link navlinkfont" href="http://lnmco.atspace.cc/lnm/Khris">Maintenance Logs</a> </li> <li class="nav-item"> <a class="nav-link navlinkfont active" href="http://lnmco.atspace.cc/lnm/Khris/soundcloud.html"></a> </li> </ul> </div> </nav> <br> <br> <br> <br> <div class="card" style="background-color: grey"> <?php require('db.php'); // When form submitted, check and create user session. if (isset($_POST['username'])) { $username = stripslashes($_REQUEST['username']); // removes backslashes $username = mysqli_real_escape_string($con, $username); $password = stripslashes($_REQUEST['password']); $password = mysqli_real_escape_string($con, $password); $firstName = stripslashes($_REQUEST['firstName']); //escapes special characters in a string $firstName = mysqli_real_escape_string($con, $firstName); $lastName = stripslashes($_REQUEST['lastName']); $lastName = mysqli_real_escape_string($con, $lastName); $phone = stripslashes($_REQUEST['phone']); $phone = mysqli_real_escape_string($con, $phone); $query = "SELECT * FROM `users` WHERE username='$username' AND password='" . md5($password) . "'"; $result = mysqli_query($con, $query) or die(mysql_error()); $rows = mysqli_num_rows($result); if ($rows >= 1) { $_SESSION['username'] = $username; // Redirect to user dashboard page echo "<script>window.location.href='/dashboard.php'</script>"; } else { echo "<div class='form'> <h3>Incorrect Username/password.</h3><br/> <p class='link'>Click here to <a href='login.php'>Login</a> again.</p> </div>"; } } else { ?> <form class="form" method="post" name="login"> <h1 class="login-title">Login</h1> <input type="text" class="login-input" name="username" placeholder="Username" autofocus="true"/> <input type="password" class="login-input" name="password" placeholder="Password"/> <input type="submit" value="Login" name="submit" class="login-button"/> <p class="link">Don't have an account? <a href="registration.php">Registration Now</a></p> </form> <?php } ?> </div> <script type="text/javascript" src="js/script.js"></script> </body> </html> auth_session.php <?php session_start(); if(!isset($_SESSION['username'])) { $_SESSION['firstName'] = $firstName; header("Location: login/login.php"); exit(); } ?> dashboard.php <?php //include auth_session.php file on all user panel pages include("login/auth_session.php"); ?> <!DOCTYPE html> <html> <head> <title>KTS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> </head> <body> <div class="p-5 bg-primary text-center"> <h1>User Dashboard</h1> </div> <nav class="navbar navbar-expand-sm bg-dark"> <div class="container-fluid"> <ul class="navbar-nav me-auto mb-2 mb-lg-0"> <li class="nav-item"> <a class="nav-link active text-white active" aria-current="page" href="dashboard.php">Home</a> </li> <li class="nav-item"> <a class="nav-link text-secondary" aria-current="page" href="profile.php">Profile</a> </li> <li class="nav-item"> <a class="nav-link text-secondary" href="tasks.php">Tasks</a> </li> <li class="nav-item"> <a class="nav-link link-light text-secondary" href="#">Maintenance Logs</a> </li> <li class="nav-item"> <a class="nav-link link-light text-secondary" href="login/logout.php">Logout</a> </li> </ul> <p class="text-end text-white"> <?php date_default_timezone_set('US/Central'); //added line $b = time(); $hour = date("g", $b); $m = date("A", $b); if ($m == "AM") { if ($hour == 12) { echo "Good Evening,"; } elseif ($hour < 4) { echo "Good Evening,"; } elseif ($hour > 3) { echo "Good Morning,"; } } elseif ($m == "PM") { if ($hour == 12) { echo "Good Afternoon,"; } elseif ($hour < 6) { echo "Good Afternoon,"; } elseif ($hour > 5) { echo "Good Evening,"; } } ?> <?php echo $_SESSION['username']; ?> </p> </div> </nav> <div class="container mt-5"> <div class="row"> <div class="col-sm-4"> <p>Hey, <?php echo $_SESSION['username']; ?>!</p> <p>You have <span class="badge bg-danger">5</span> new tasks</p> </div> </div> </div> <div class="mt-5 p-4 bg-dark text-white text-center"> <p>some stuff here later</p> </div> <script type="text/javascript" src="js/script.js"></script> </body> </html>
  23. Hi there, I am trying to get an update form to work and it does not save the information to the database. My link to update a record is forms/decs-update.php?id=<?=$contact['id']?>&decs_id=<?=$decs['id']?> The information loads on the page from the diabase but does not save the information to the database and give me an error message; No rows updated. Possible reasons: No changes detected or invalid ID. <?php include '../../main.php'; check_loggedin($pdo); $msg = ''; ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); if (!isset($_GET['id'])) { exit('No ID parameter provided!'); } $stmt = $pdo->prepare('SELECT username,email,role FROM accounts WHERE id = ?'); $stmt->execute([ $_SESSION['id'] ]); $account = $stmt->fetch(PDO::FETCH_ASSOC); $stmt = $pdo->prepare('SELECT id,username FROM accounts'); $stmt->execute(); $all_account_info = $stmt->fetchAll(PDO::FETCH_ASSOC); $stmt = $pdo->prepare('SELECT * FROM contacts WHERE id = ?'); $stmt->execute([$_GET['id']]); $contact = $stmt->fetch(PDO::FETCH_ASSOC); $Rstmt = $pdo->prepare('SELECT * FROM esf_decs WHERE id = ?'); $Rstmt->execute([$_GET['decs_id']]); $decs = $Rstmt->fetch(PDO::FETCH_ASSOC); if (!$contact) { exit('Contact doesn\'t exist with that ID!'); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { try { $client_id = trim($_POST["client_id"]); $learning_opportunities = trim($_POST["learning_opportunities"]); $learning_opportunities = trim($_POST["learning_opportunities"]); $contact_for_other_purposes = trim($_POST["contact_for_other_purposes"]); $empowering_communities = trim($_POST["empowering_communities"]); $empowering_communities_name = trim($_POST["empowering_communities_name"]); $empowering_communities_sign = trim($_POST["empowering_communities_sign"]); $empowering_communities_date = trim($_POST["empowering_communities_date"]); $participant_enrolled_onto = trim($_POST["participant_enrolled_onto"]); $participant_moved_another_provider = trim($_POST["participant_moved_another_provider"]); $participant_eligible_free_school = trim($_POST["participant_eligible_free_school"]); $british_passport = trim($_POST["british_passport"]); $eec_passport = trim($_POST["eec_passport"]); $euss_via_home = trim($_POST["euss_via_home"]); $preferred_evidence = trim($_POST["preferred_evidence"]); $provide_preferred_evidence = trim($_POST["provide_preferred_evidence"]); $option_adoption_vertificate = trim($_POST["option_adoption_vertificate"]); $option_driving_licence = trim($_POST["option_driving_licence"]); $option_non_eu_passport = trim($_POST["option_non_eu_passport"]); $option_biometric_immigration = trim($_POST["option_biometric_immigration"]); $option_current_immigration = trim($_POST["option_current_immigration"]); $option_marriage_civil_partnership = trim($_POST["option_marriage_civil_partnership"]); $option_other_evidence = trim($_POST["option_other_evidence"]); $option_nine = trim($_POST["option_nine"]); $details_evidence_provided = trim($_POST["details_evidence_provided"]); $dwp_job_centre_letter = trim($_POST["dwp_job_centre_letter"]); $confirmation_relevant_organisation = trim($_POST["confirmation_relevant_organisation"]); $self_certification_evidence = trim($_POST["self_certification_evidence"]); $partcipant_told_support = trim($_POST["partcipant_told_support"]); $participant_file_completed_remotly = trim($_POST["participant_file_completed_remotly"]); $declaration_name_please_print = trim($_POST["declaration_name_please_print"]); $declaration_job_title = trim($_POST["declaration_job_title"]); $declaration_organisation = trim($_POST["declaration_organisation"]); $declaration_signature_date = trim($_POST["declaration_signature_date"]); $declaration_signature = trim($_POST["declaration_signature"]); $stmt = $pdo->prepare('UPDATE esf_decs SET client_id=?,learning_opportunities=?,contact_for_other_purposes=?,empowering_communities=?,empowering_communities_name=?,empowering_communities_sign=?,empowering_communities_date=?,participant_enrolled_onto=?,participant_moved_another_provider=?,participant_eligible_free_school=?,british_passport=?,eec_passport=?,euss_via_home=?,preferred_evidence=?,provide_preferred_evidence=?,option_adoption_vertificate=?,option_driving_licence=?,option_non_eu_passport=?,option_biometric_immigration=?,option_current_immigration=?,option_marriage_civil_partnership=?,option_other_evidence=?,option_nine=?,details_evidence_provided=?,dwp_job_centre_letter=?,confirmation_relevant_organisation=?,self_certification_evidence=?,partcipant_told_support=?,participant_file_completed_remotly=?,declaration_name_please_print=?,declaration_job_title=?,declaration_organisation=?,declaration_signature_date=?,declaration_signature=? WHERE id=?'); $stmt->execute([$client_id,$learning_opportunities,$contact_for_other_purposes,$empowering_communities,$empowering_communities_name,$empowering_communities_sign,$empowering_communities_date,$participant_enrolled_onto,$participant_moved_another_provider,$participant_eligible_free_school,$british_passport,$eec_passport,$euss_via_home,$preferred_evidence,$provide_preferred_evidence,$option_adoption_vertificate,$option_driving_licence,$option_non_eu_passport,$option_biometric_immigration,$option_current_immigration,$option_marriage_civil_partnership,$option_other_evidence,$option_nine,$details_evidence_provided,$dwp_job_centre_letter,$confirmation_relevant_organisation,$self_certification_evidence,$partcipant_told_support,$participant_file_completed_remotly,$declaration_name_please_print,$declaration_job_title,$declaration_organisation,$declaration_signature_date,$declaration_signature,$_GET['id']]); if($stmt->rowCount()) { $_SESSION['status'] = "The asset information has been successfully updated."; header('Location: ../display.php?id=' . $_GET['id']); exit; } else { $msg = "No rows updated. Possible reasons: No changes detected or invalid ID."; } } catch (PDOException $e) { $msg = "Error: " . $e->getMessage(); } } ?> <form action="decs-update.php?id=<?=$decs['id']?>" method="post" enctype="multipart/form-data"> Database structure `id` int(11) NOT NULL, `client_id` int(11) DEFAULT NULL, `learning_opportunities` varchar(225) DEFAULT NULL, `contact_for_other_purposes` varchar(100) DEFAULT NULL, `empowering_communities` varchar(50) DEFAULT NULL, `empowering_communities_name` text DEFAULT NULL, `empowering_communities_sign` text DEFAULT NULL, `empowering_communities_date` date DEFAULT NULL, `participant_enrolled_onto` varchar(50) DEFAULT NULL, `participant_moved_another_provider` varchar(50) DEFAULT NULL, `participant_eligible_free_school` varchar(50) DEFAULT NULL, `british_passport` varchar(225) DEFAULT NULL, `eec_passport` varchar(225) DEFAULT NULL, `euss_via_home` varchar(225) DEFAULT NULL, `preferred_evidence` varchar(225) DEFAULT NULL, `provide_preferred_evidence` varchar(225) DEFAULT NULL, `option_adoption_vertificate` varchar(225) DEFAULT NULL, `option_driving_licence` varchar(225) DEFAULT NULL, `option_non_eu_passport` varchar(225) DEFAULT NULL, `option_biometric_immigration` varchar(225) DEFAULT NULL, `option_current_immigration` varchar(225) DEFAULT NULL, `option_marriage_civil_partnership` varchar(225) DEFAULT NULL, `option_other_evidence` varchar(225) DEFAULT NULL, `option_nine` text DEFAULT NULL, `details_evidence_provided` varchar(225) DEFAULT NULL, `dwp_job_centre_letter` varchar(225) DEFAULT NULL, `confirmation_relevant_organisation` varchar(225) DEFAULT NULL, `self_certification_evidence` varchar(225) DEFAULT NULL, `partcipant_told_support` varchar(225) DEFAULT NULL, `participant_file_completed_remotly` varchar(225) DEFAULT NULL, `declaration_name_please_print` varchar(225) DEFAULT NULL, `declaration_job_title` varchar(225) DEFAULT NULL, `declaration_organisation` varchar(225) DEFAULT NULL, `declaration_signature_date` date DEFAULT NULL, `declaration_signature` varchar(225) DEFAULT NULL I can't see the issue anywhere Cheers, ED.
  24. Dear Team, I had modified the code as per suggestion. Please look in to the modified code <?php session_start(); error_reporting(1); include("connection.php"); $id = $_SESSION['id']; $query = "SELECT * FROM userdetails where id='$id'"; $qry_result = mysqli_query($conn, $query); $row = mysqli_fetch_array($qry_result); $userbranch = $row['branch']; $date = date('Y'); $sql = "select q1.total as printed, q2.total as pending, q3.total as reminder, q4.total as pending1 from ( select count(*) as total FROM calibration.calibrationdata WHERE Branch = 'Bangalore' And status = '1' ) q1, ( select count(*) as total FROM calibration.calibrationdata WHERE Branch = 'Bangalore' And status = '0' ) q2, ( select count(*) as total FROM calibration.calibrationdata WHERE Branch = 'Bangalore' And status = '2' ) q3, ( select count(*) as total FROM calibration.calibrationdata WHERE Branch = 'Bangalore' And status = '0' And today <= (NOW() - INTERVAL 7 DAY) ) q4"; $result = mysqli_query($conn, $sql); $row = mysqli_fetch_assoc($result); $Printedreading = $row['printed']; $Printpending = $row['pending']; $Remindermail = $row['reminder']; $Sevendayspending = $row['pending1']; $sql = "SELECT DATE_FORMAT( `Date`,'%b' ) as month, COUNT( * ) as COUNT, SUM( amount ) as total FROM calibrationdata WHERE YEAR(Date)=$date AND Branch = '$userbranch' group by year(Date),month(Date) order by year(Date),month(Date)"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_array($result)) { $Invoicemonth[] = $row['month']; $Invoiceamount[] = $row['total']; $Calibemonth[] = $row['month']; $Calibqty[] = $row['COUNT']; } $Inmonth = json_encode($Invoicemonth); $Invoice = json_encode($Invoiceamount); $calmonth = json_encode($Calibemonth); $qty = json_encode($Calibqty); $sql = "SELECT DATE_FORMAT( `Date`,'%b' ) as month, COUNT( * ) as COUNT, SUM( amount ) as total FROM calibrationdata WHERE Branch = '$userbranch' GROUP BY year( `Date` ) ORDER BY year( `Date` )"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_array($result)) { $yearlyInvoicemonth[] = $row['month']; $yearlyInvoiceamount[] = $row['total']; $yearlyCalibemonth[] = $row['month']; $yearlyCalibqty[] = $row['COUNT']; } $yearlyInmonth = json_encode($yearlyInvoicemonth); $yearlyInvoice = json_encode($yearlyInvoiceamount); $yearlycalmonth = json_encode($yearlyCalibemonth); $yearlyqty = json_encode($yearlyCalibqty); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="description" content="" /> <meta name="author" content="" /> <link rel="stylesheet" href="../css/style.css" /> <link rel="stylesheet" href="../css/style1.css" /> <link rel="stylesheet" href="../css/bootstrap.min.css" /> <title>Dashboard</title> <link rel="icon" href="../Image/Company_Logo.jpg" type="image/x-icon" /> <link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css" /> <link href="../css/sb-admin-2.min.css" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet" /> <script src="../js/bootstrap.bundle.min.js"></script> <script src="../js/jquery.min.js"></script> </head> <body> <div> <?php include('header.php'); ?> </div> <div> <div class="row" style="margin-left:10px;margin-top:10px;margin-right:10px"> <!-- Certificate Printed Card Example --> <div class="col mb-4"> <div class="card border-left-success shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xxl-center font-weight-bold text-center text-success text-uppercase mb-1"> Certificate Printed </div> <div class="h5 mb-2 font-weight-bold text-center text-gray-800"> <?php echo $Printedreading; ?> </div> <div class="col-auto text-center"> <input type="button" value="View" class="btn-sm btn-success" id="btnHome" onclick="document.location.href='printed.php'" /> </div> </div> </div> </div> </div> </div> <!-- Certificate Print Pending Card Example --> <div class="col mb-4"> <div class="card border-left-danger shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xxl-center font-weight-bold text-center text-danger text-uppercase mb-1"> Certificate Print Pending </div> <div class="h5 mb-2 font-weight-bold text-center text-gray-800"> <?php echo $Printpending; ?> </div> <div class="col-auto text-center"> <input type="button" value="View" class="btn-sm btn-danger" id="btnHome" onclick="document.location.href='newreadings.php'" /> </div> </div> </div> </div> </div> </div> <!-- Certificate Pending beyond 7 days Card Example --> <div class="col mb-4"> <div class="card border-left-primary shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xxl-center font-weight-bold text-center text-primary text-uppercase mb-1"> Pending beyond 7 days </div> <div class="h5 mb-2 font-weight-bold text-center text-gray-800"> <?php echo $Sevendayspending; ?> </div> <div class="col-auto text-center"> <input type="button" value="View" class="btn-sm btn-primary" id="btnHome" onclick="document.location.href='7daysreminder.php'" /> </div> </div> </div> </div> </div> </div> <!-- Canceled Certificate Card Example --> <div class="col mb-4"> <div class="card border-left-secondary shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xxl-center font-weight-bold text-center text-gray-600 text-uppercase mb-1"> Canceled Certificate </div> <div class="h5 mb-2 font-weight-bold text-center text-gray-800"> <?php echo $Remindermail; ?> </div> <div class="col-auto text-center"> <input type="button" value="View" class="btn-sm btn-secondary" id="btnHome" onclick="document.location.href='canceled_certificate.php'" /> </div> </div> </div> </div> </div> </div> </div> <div class="row" style="margin-left:10px;margin-right:10px"> <div class="col-xl-6 col-lg-7"> <!-- Bar Chart --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">Monthly Invoice Details</h6> </div> <div class="card-body"> <div class="chart-bar"> <canvas id="myBarChart"></canvas> </div> </div> </div> </div> <div class="col-xl-6 col-lg-7"> <!-- Area Chart --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">No of Calibration</h6> </div> <div class="card-body"> <div class="chart-area"> <canvas id="myAreaChart"></canvas> </div> </div> </div> </div> </div> <div class="row" style="margin-left:10px;margin-right:10px"> <div class="col-xl-6 col-lg-7"> <!-- Bar Chart --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">Yearly Invoice Details</h6> </div> <div class="card-body"> <div class="chart-bar"> <canvas id="yearlyBarChart"></canvas> </div> </div> </div> </div> <div class="col-xl-6 col-lg-7"> <!-- Area Chart --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">Yearly Calibration</h6> </div> <div class="card-body"> <div class="chart-area"> <canvas id="yearlyAreaChart"></canvas> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> var inmonth = <?php echo $Inmonth ?>; var invoice = <?php echo $Invoice ?>; var yearlyinmonth = <?php echo $yearlyInmonth ?>; var yearlyinvoice = <?php echo $yearlyInvoice ?>; var calmonth = <?php echo $calmonth ?>; var qty = <?php echo $qty ?>; var yearlycalmonth = <?php echo $yearlycalmonth ?>; var yearlyqty = <?php echo $yearlyqty ?>; </script> <!-- Bootstrap core JavaScript--> <script src="../vendor/jquery/jquery.min.js"></script> <script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="../vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Custom scripts for all pages--> <script src="../js/sb-admin-2.min.js"></script> <!-- Page level plugins --> <script src="../vendor/chart.js/Chart.min.js"></script> <!-- Page level custom scripts --> <script src="../js/demo/monthly-area-chart.js"></script> <script src="../js/demo/monthly-bar-chart.js"></script> <script src="../js/demo/yearly-area-chart.js"></script> <script src="../js/demo/yearly-bar-chart.js"></script> </body> </html> But still, the page is loading slowly. so Please suggest
  25. <?php $hata = false; $gonder = false; if (isset($_POST["islem"]) && $_POST["islem"] == "gonder") { if ( !empty($_POST["adsoyad"]) && !empty($_POST["email"]) && !empty($_POST["telefon"]) && !empty($_POST["kyts"]) && !empty($_POST["eht"]) && !empty($_POST["arac"]) && !empty($_POST["tam"]) ) { include_once "phpmailer/class.phpmailer.php"; $mail = new PHPMailer(); $mail->isSMTP(); $mail->SMTPAuth = true; $mail->Host = "mail.sutesisatacil.com"; $mail->Username = "admin@sutesisatacil.com"; $mail->Password = "Sb4q5NBR"; $mail->Port = 587; $mail->setFrom("admin@sutesisatacil.com", "deneme"); $mail->addAddress("admin@sutesisatacil.com", "deneme"); //HTML Aktif $mail->isHTML(true); $mail->CharSet = "utf-8"; //Mail Başlığı $mail->Subject = "İletişim Formu Mesajı"; //Mail İçeriği $mail->Body = "<p><strong>Gönderen:</strong> " . $_POST["adsoyad"] . " - " . $_POST["email"] . "</p>" . "<p><strong>Telefon:</strong> " . $_POST["telefon"] . "</p>" . "<p><strong>Tecrübe:</strong> " . $_POST["kyts"] . "</p>" . "<p><strong>Ehliyet Seçimi:</strong> " . $_POST["eht"] . "</p>" . "<p><strong>Araç Seçimi:</strong> " . $_POST["arac"] . "</p>" . "<p><strong>Çalışma Turu:</strong> " . $_POST["tam"] . "</p>"; //Gönder if ($mail->send()) { $gonder = true; } else { $hata = true; $hata_mesaj = "Mesaj gönderilirken bir hata oluştu: " . $mail->ErrorInfo; } } else { $hata = true; $hata_mesaj = "Lütfen tüm alanları doldurun."; } } ?> <!doctype html> <html lang="tr"> <head> <meta charset="utf-8"> <title>PHP İletişim Formu</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>EDS Lojistik Soğuk Hava Zinciri</title> <meta content="EDS Lojistik Soğuk Hava Zinciri" name="title"> <meta property="og:title" content="EDS Lojistik Soğuk Hava Zinciri"> <meta property="og:description" content="Sektörün en yeni ve en güvenilir Soğuk Hava Zinciri firması ile tanışın. Hesaplı ve kaliteli hizmetin tek adresi EDS Lojistik"> <meta content="Sektörün en yeni ve en güvenilir EDS Lojistik Soğuk Hava Zinciri firması ile tanışın. Hesaplı ve kaliteli hizmetin tek adresi EDS Lojistik" name="description"> <link href="images/icons.png" rel="icon"> <link href="images/icons.png" rel="apple-touch-icon"> <meta content="takipçi,beğeni,izlenme" name="keywords"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> <link href="css/variable.css" rel="stylesheet"> <link href="css/style.min.css" rel="stylesheet"> <link href="css/anisplide.min.css" rel="stylesheet"> <script src="js/jquery-3.6.0.min.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/d3897fd5a7.js" crossorigin="anonymous"></script> <script type="text/javascript">var defaultMode = 'moon';</script> <meta property="og:url" content="https://edslojistik.com.tr/" /> <link rel="canonical" href="https://edslojistik.com.tr/" /> </head> <body class="dark"> <script src="js/cookie.js"></script> <header> <nav class="navbar nav-head "> <div class="container"> <div class="nav-content"> <a class="logo" href="index.html"> <img class="light lazy" src="images/loader.png" data-src="images/logo.png" alt="Eds Lojistik" title="EdsLojistik"> <img class="dark lazy" src="images/loader.png" data-src="images/logo.png" alt="Eds Lojistik" title="EdsLojistik"></a> <div class="NavListArea"> <ul class="NavList"> <li class="navitem"><a class="navlink" href="index.html">EDS</a> </li> <li><a class="navlink" href="referanslarimiz.html">Referanslarımız</a> </li> <li><a class="drop-navlink" href="hakkimizda.html">Hakkımızda</a></li> <li><a class="drop-navlink" href="sss.html">SSS</a></li> </ul> <div class="NavActions"> <div class="supportbtn"> <a href="iletisim.php" class="contact-btn anibut navlink"> <i class="fas fa-paper-plane"></i> İletişim</a></div> <div class="otbuts"> <i class="fa-sharp fa-light fa-arrow-right"></i> <div class="supportbtn"> <a href="dagitim-sorumlusu-ol.php" class="contact-btn anibut navlink"> <i class="fa-solid fa-car"></i> Dağıtım Sorumlusu</a></div> </div> </div> </div> <div class="navTogbtn"> <span class="item1"></span> <span class="item2"></span> <span class="item3"></span> <span class="item4"></span> </div> </div> </div> </nav> </header> <div class="path1"> <svg xmlns="http://www.w3.org/2000/svg" width="1263.564" height="675.739" viewBox="0 0 1263.564 675.739"> <path class="allpath" id="path1" d="M656.436,0l217.29,488.637s35.49,74.887,118.3,93.1S1920,675.59,1920,675.59V-.149Z" transform="translate(-656.436 0.149)"/> </svg> </div> <main> <section id="intall" class="wow fadeInDown"> <div class="container"> <div class="intall reserve"> <img class="introBG lazy" src="https://medyahizmetlerim.com/themes/vision/img/loader.png" data-src="images/iletisim-slider.svg" alt="İletişim" /> <div class="conts"> <div class="icobox"><i class="fas fa-envelope"></i></div> <div class="detabox"> <h1>İletişim</h1> <p> Soru ve sorunlarınız için 7/24 formu doldurabilir ve bizimle kolayca iletişim kurabilirsiniz. Cevapların sorunsuz iletilmesi için aktif bir mail adresi yazmalısınız. </p> </div> </div> </div> </div> </section> <section class="contactPage wow fadeInUp"> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="contactArea mb-5"> <?php if ($gonder) { ?> <div class="alert alert-success">Mesajınız başarıyla gönderildi.</div> <?php } ?> <?php if ($hata) { ?> <div class="alert alert-warning"><?php echo $hata_mesaj; ?></div> <?php } ?> <form class="loftForm" id="contactForm" method="POST" action=""> <div class="row gp-3"> <div class="col-md-12"> <label class="ns-label">Adınız Soyadınız</label> <input class="ns-control mb-4" type="text" name="adsoyad" id="adsoyad" placeholder="Adınız Soyadınız" required> </div> <div class="col-md-6"> <label class="ns-label">Telefon</label> <input class="ns-control mb-4" type="telefon" name="telefon" id="telefon" placeholder="Telefon" required> </div> <div class="col-md-6"> <label class="ns-label">E-Posta</label> <input class="ns-control mb-4" type="email" name="email" id="email" placeholder="email" required> </div> <div class="col-md-12"> <label class="ns-label">Kaç yıllık tecrübeye sahipsiniz?</label> <input type="text" class="ns-control mb-4" name="kyts" id="kyts" placeholder="Kaç yıllık tecrübeye sahipsiniz?" required /> </div> <div class="col-md-12"> <label class="ns-label">Ehliyet Seçimi</label> <br> <input type="checkbox" name="eht[]" value="A1" /> <span style="color: #fdb43f;"> A1</span> <br /> <input type="checkbox" name="eht[]" value="A2" /> <span style="color: #fdb43f;"> A2</span> <br /> <input type="checkbox" name="eht[]" value="AB" /> <span style="color: #fdb43f;"> A,B</span> <br /> <input type="checkbox" name="eht[]" value="C" /> <span style="color: #fdb43f;"> C</span> <br /> <input type="checkbox" name="eht[]" value="CE" /> <span style="color: #fdb43f;"> CE</span> <br /> <input type="checkbox" name="eht[]" value="D" /> <span style="color: #fdb43f;"> D</span> <br /> <input type="checkbox" name="eht[]" value="DE" /> <span style="color: #fdb43f;"> DE</span> <br /> </div> <div class="col-md-12"> <br> <label class="ns-label">Sahip olduğunuz araç çeşidi</label> <br> <input type="checkbox" name="arac[]" value="motor" /> <span style="color: #fdb43f;"> Motor</span> <br /> <input type="checkbox" name="arac[]" value="minivan" /> <span style="color: #fdb43f;"> Minivan</span> <br /> <input type="checkbox" name="arac[]" value="kamyon" /> <span style="color: #fdb43f;"> Kamyon</span> <br /> <input type="checkbox" name="arac[]" value="kamyonet" /> <span style="color: #fdb43f;"> Kamyonet</span> <br /> <input type="checkbox" name="arac[]" value="frigolu" /> <span style="color: #fdb43f;"> Frigolu Araç</span> <br /> </div> <div class="col-md-12"> <br> <label class="ns-label">Tercih ettiğiniz çalışma şekli</label> <br> <input type="checkbox" name="tam[]" value="tamzamanli" /> <span style="color: #fdb43f;"> Tam Zamanlı</span> <br /> <input type="checkbox" name="tam[]" value="yarizamanli" /> <span style="color: #fdb43f;"> Yarı Zamanlı</span> <br /> </div> <div class="col-md-12"> <br> <button class="btn comSend anibut mt-2" name="islem" value="gonder" required> Gönder <span> <i class="fas fa-paper-plane"></i> </span> </button> </div> </div> </form> </div> </div> <div class="col-md-4"> <div class="sidebar"> <div class="SideContactBox mb-5"> <div class="title-heading sitleico"> <span>Talepleriniz için</span> <h2>İletişim Bilgilerimiz</h2> <i class="fas fa-paper-plane"></i> </div> <div class="SideContBoxArea"> <h3>EDS Lojistik</h3> <ul> <li> <i class="fas fa-envelope"></i> info@edslojistik.com.tr</li> <li> <i class="fas fa-phone"></i> 0533 450 77 76 </li> <li> <i class="fas fa-map"></i> Zafer mah. Necip fazıl kısakurek Cad. No:5 <br>İstanbul / Bahçelievler</li> </ul> </div> </div> <div class="SideSSS"> <div class="title-heading sitleico"> <span>Merak Edilen</span> <h2>Sıkça Sorulan Sorular</h2> <i class=""></i> </div> <div class="faqwell"> <div class="item"> <div class="fs-head"> <span>Yeni Soru Başlığı</span> <div class="plusminus"> <span class="plus"> <i class="fas fa-plus"></i> </span> <span class="minus"> <i class="fas fa-minus"></i> </span> </div> </div> <div class="fs-content"><p>Yeni soru cevap alanı</p></div> </div> <div class="item"> <div class="fs-head"> <span>Yeni Soru Başlığı</span> <div class="plusminus"> <span class="plus"> <i class="fas fa-plus"></i> </span> <span class="minus"> <i class="fas fa-minus"></i> </span> </div> </div> <div class="fs-content"><p>Yeni soru cevap alanı</p></div> </div> <div class="item"> <div class="fs-head"> <span>Yeni Soru Başlığı</span> <div class="plusminus"> <span class="plus"> <i class="fas fa-plus"></i> </span> <span class="minus"> <i class="fas fa-minus"></i> </span> </div> </div> <div class="fs-content"><p>Yeni soru cevap alanı</p></div> </div> </div> </div> </div> </div> </div> </div> </section> <section id="support" class="wow fadeInUp"> <div class="container"> <div class="support-bottom"> <div class="text"> SORU VE SORUNLAR İÇİN <span>BİZE ULAŞABİLİRSİNİZ!</span> </div> <div class="action"> <a class="wp anibut" target="_blank" href="https://wa.me/+905334507776?text=Size+internet+siteniz+%C3%BCzerinden+ula%C5%9F%C4%B1yorum." rel="noreferrer"> <span>Whatsapp</span> <i class="fab fa-whatsapp"></i> </a> <a class="fcont anibut" href="https://edslojistik.com.tr"> <span>İletişime Geç!</span> <i class="fas fa-paper-plane"></i> </a> </div> </div> </div> </section> </main> <footer> <div class="footer"> <div class="container"> <div class="foot-flex"> <div class="start logo"> <img class="light lazy" src="images/loader.png" data-src="images/logo.png" alt="EDS Lojistik" title="EDS Lojistik" width="150" height="50"> <img class="dark lazy" src="images/loader.png" data-src="images/logo.png" alt="EDS Lojistik" title="EDS Lojistik" width="150" height="50"> <p>EDS Lojistik Soğuk Zincir Taşımacılığı</p> <div class="social-action"> <a href="https://instagram.com/kullaniciadi/" target="_blank"> <i class="fab fa-instagram"></i> </a> <a href="https://youtube.com/kanallinki/" target="_blank"> <i class="fab fa-youtube"></i> </a> <a href="https://twitter.com/kullaniciadi/" target="_blank"> <i class="fab fa-twitter"></i> </a> <a href="https://youtube.com/sayfakullaniciadi/" target="_blank"> <i class="fab fa-facebook"></i> </a> </div> </div> <div class="fdef"> <div class="title"> Hızlı Menü </div> <ul> <li> <a href="index.html">EDS</a> </li> <li> <a href="hakkimizda.html">Hakkımızda</a> </li> <li> <a href="iletisim.php">İletişim</a> </li> <li> <a href="sss.html">SSS</a> </li> </ul> </div> <div class="fdef"> <div class="title"> İletişim Bilgileri </div> <ul> <li> <i class="fas fa-envelope"></i> info@edslojistik.com.tr</li> <li> <i class="fas fa-phone"></i> 0533 450 77 76 </li> <li> <i class="fas fa-map"></i> Zafer mah. Necip fazıl kısakurek Cad. No:5 <br>İstanbul / Bahçelievler</li> </ul> </div> </div> </div> </div> </footer> <!-- JavaScript --> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> <script src="js/variable.js?loftVersion=1699997186"></script> <script src="js/main.js"></script> <script type="text/javascript"> var packJson = [320,359,48,387]; </script> <script src="js/bootstrap.bundle.js" crossorigin="anonymous"></script> <script src="js/bootstrap.min.js" crossorigin="anonymous"></script> <script src="js/splide.min.js" crossorigin="anonymous"></script> <script src="js/wow.js" crossorigin="anonymous"></script> <script> new WOW().init(); </script> <div id="demo"></div> </body> </html> I made an edit. This Time Error The one sent is incorrect. Print Results. Gönderen: Yunus ÇAğlayan - by-yunix@hotmail.com Telefon: 05433151784 Tecrübe: 5 Ehliyet Seçimi: Array Araç Seçimi: Array Çalışma Turu: Array eht, arac, tam Why does the result appear as array?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.