abu taher 34 Practically a Posting Shark

As follow your suggestions the script didn't work. Now no result show in Total days and total salary input field. There are no error show in browser console.

AndreRet commented: Did it came up with errors?, If so what error on which line? +15
abu taher 34 Practically a Posting Shark

In HTMl from I have a Input field type month. When I select a month and click on search button then total days of selected month show in HTMl table with backend data. This table contain salary. I want the salary is calculate with Total days. I write a script. But When I click on search button the calculated salary doesn't show in input box in HTML table. When I change the value of total days from input field then all salary show in table.
I want It will show when I click on search button and if I need to modify days then it will also change. But I can't find out the problem is where?

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

include('conn.php');
include('navbar.php');

$error_msg = '';
$att_msg = '';

try {
    // ...

    if (isset($_POST['save'])) {
        $course = $_POST['whichmonth'];

        $con = mysqli_connect("localhost", "root", "", "madrasadb");

        // Prepare the SQL statement
        $stat = mysqli_prepare($con, "INSERT INTO stdattendence (id, stdname, stdfname, class, present, month) VALUES (?, ?, ?, ?, ?, ?)");

        // Bind the parameters
        mysqli_stmt_bind_param($stat, "ssssss", $stat_id, $stat_name, $stat_fname, $st_status, $course);

        foreach ($_POST['st_status'] as $i => $st_status) {
            $stat_id = $_POST['stat_id'][$i];
            $stat_name = $_POST['stat_name'][$i];
            $stat_fname = $_POST['stat_fname'][$i];

            // Execute the prepared statement
            mysqli_stmt_execute($stat);
        }

        $att_msg = "Attendance Recorded.";

        mysqli_stmt_close($stat);
        mysqli_close($con);
    }

    // ...

} catch (Exception $e) {
    $error_msg = $e->getMessage();
}
?>


<!DOCTYPE html>
<html lang="en">

<body>
    <div class="content">
        <div class="container-fluid page-body-wrapper">
            <div class="main-panel">
                <div class="content-wrapper">
                    <div class="row">
                        <div class="col-md-12 grid-margin stretch-card">
                            <div class="card">
                                <div class="card-body">
                                    <h3>Attendance of …
AndreRet commented: Glad to see you on Daniweb again! +15
abu taher 34 Practically a Posting Shark

I make some change in this code. because I did some mistake. now it works:

<?php
require_once __DIR__ . '/vendor/autoload.php';
include('conn.php');
$res = mysqli_query($conn, "select * from smash");

if (mysqli_num_rows($res) > 0) {
  $html = '<table>';
  $html .= '<tr><td>ID</td><td>Name</td><td>FatherName</td><td>Address</td><td>Phone</td><td>Class</td><td>Qualification</td><td>Branch</td><td>rollno</td></tr>';
  while ($row = mysqli_fetch_assoc($res)) {
    $html .= '<tr><td>' . $row['id'] . '</td><td>' . $row['name'] . '</td><td>' . $row['fname'] . '</td>
        <td>' . $row['address'] . '</td><td>' . $row['phone'] . '</td><td>' . $row['class'] . '</td>
        <td>' . $row['qualification'] . '</td><td>' . $row['branch'] . '</td>
        <td>' . $row['rollno'] . '</td><td>' . $row['gender'] . '</td>
        <td>' . $row['birth'] . '</td></tr>';
  }
  $html .= '</table>';
} else {
  $html = "Data not found";
};

$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML($html);
$file = time() . '.pdf';
$mpdf->output($file, 'D');
abu taher 34 Practically a Posting Shark

I want to make a pdf file in php. I write code like this:

<?php
require_once __DIR__ . '/vendor/autoload.php';
include('conn.php');
$res = mysqli_query($conn, "select * from smash");

if (mysqli_num_rows($res) > 0) {
    $html = '<table>';
    $html = '<tr><td>ID</td><td>Name</td><td>FatherName</td><td>Address</td><td>Phone</td><td>Class</td><td>Qualification</td><td>Branch</td><td>rollno</td></tr>';
    while ($row = mysqli_fetch_assoc($res)) {
        $html .= '<tr><td>' . $row['id'] . '</td><td>' . $row['name'] . '</td><td>' . $row['fname'] . '</td>
        <td>' . $row['address'] . '</td><td>' . $row['phone'] . '</td><td>' . $row['class'] . '</td>
        <td>' . $row['qualification'] . '</td><td>' . $row['branch'] . '</td>
        <td>' . $row['rollno'] . '</td><td>' . $row['gender'] . '</td>
        <td>' . $row['birth'] . '</td></tr>'
    }
    $html= '</table>';
  {
    $html = "Data not found"
  }};

$mpdf = new mPDF();
$mpdf->WriteHTML($html);
$file = time() . '.pdf';
$mpdf->output($file, 'D');

But a error show: Parse error: syntax error, unexpected token "}" in C:\xampp\htdocs\Management\printstudentdata.php on line 15

I use PHp 8.

abu taher 34 Practically a Posting Shark

lot of ............avira, avast, macfee.............all of them are supplied free version.

jingda commented: Cheers and welcome back to daniweb. hope you will stay longer here +9
abu taher 34 Practically a Posting Shark

this file should reside in \windows\system32 (be sure to enable viewing system files).

If it not there copy it from the XP installation disk (expand ntprint.dl_).

If it is there what is the date stamp on the file and file size

jewelcool commented: Thanks +0
abu taher 34 Practically a Posting Shark

properly change the textbox and button name as I said. look clearly. button name commandbutton1 and textbox name textbox1 and textbox2.

abu taher 34 Practically a Posting Shark

There is no built in method for this....you would have to write the code yourself. I agree with vb5prgrmr.
There have been a number of posts about screenshots....try searching there first.you can see this link

abu taher 34 Practically a Posting Shark

yes, it is possible. compile your file as exe, not swf from .fla source file. You can play SWF files with Internet Explorer. Most of the browsers do support flash these days. But in some cases you might be needed to install it if you are using the older versions of the browsers. You always need flash plug in to view flash content. Flajector converts SWF to EXE files. u can use it.

abu taher 34 Practically a Posting Shark

you can do it two way. manually do it by its properties. just connect the database. or you do it by code. actually how you want to do it?

abu taher 34 Practically a Posting Shark

plz write in English. then it is easy to solve your problem.

abu taher 34 Practically a Posting Shark

these are your requirement. but it is difficult to solve your problem. plz say the specific question. then it is easy to solve your problem.