Jump to content

Search the Community

Showing results for tags 'php database'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 4 results

  1. I have school fees management system it's work perfect but now I need to add email print on receipt I have email table but I don't know to print too on receipt kindly give me any idea to print ( <?php include 'db_connect.php'; $fees = $conn->query("SELECT ef.*,s.name as sname,s.id_no,concat(c.course,' - ',c.level) as `class` FROM student_ef_list ef inner join student s on s.id = ef.student_id inner join courses c on c.id = ef.course_id where ef.id = {$_GET['ef_id']}"); foreach($fees->fetch_array() as $k => $v){ $$k= $v; } $payments = $conn->query("SELECT * FROM payments where ef_id = $id "); $pay_arr = array(); while($row=$payments->fetch_array()){ $pay_arr[$row['id']] = $row; } ?> <style> .flex{ display: inline-flex; width: 100%; } .w-50{ width: 50%; } .text-center{ text-align:center; } .text-right{ text-align:right; } table.wborder{ width: 100%; border-collapse: collapse; } table.wborder>tbody>tr, table.wborder>tbody>tr>td{ border:1px solid; } p{ margin:unset; } </style> <div class="container-fluid"> <p class="text-center"><b><?php echo $_GET['pid'] == 0 ? "Payments" : 'Payment Receipt' ?></b></p> <hr> <div class="flex"> <div class="w-50"> <p>EF. No: <b><?php echo $ef_no ?></b></p> <p>Student: <b><?php echo ucwords($sname) ?></b></p> <p>Course/Level: <b><?php echo $class ?></b></p> </div> <?php if($_GET['pid'] > 0): ?> <div class="w-50"> <p>Payment Date: <b><?php echo isset($pay_arr[$_GET['pid']]) ? date("M d,Y",strtotime($pay_arr[$_GET['pid']]['date_created'])): '' ?></b></p> <p>Paid Amount: <b><?php echo isset($pay_arr[$_GET['pid']]) ? number_format($pay_arr[$_GET['pid']]['amount'],2): '' ?></b></p> <p>Remarks: <b><?php echo isset($pay_arr[$_GET['pid']]) ? $pay_arr[$_GET['pid']]['remarks']: '' ?></b></p> </div> <?php endif; ?> </div> <hr> <p><b>Payment Summary</b></p> <table class="wborder"> <tr> <td width="50%"> <p><b>Fee Details</b></p> <hr> <table width="100%"> <tr> <td width="50%">Fee Type</td> <td width="50%" class='text-right'>Amount</td> </tr> <?php $cfees = $conn->query("SELECT * FROM fees where course_id = $course_id"); $ftotal = 0; while ($row = $cfees->fetch_assoc()) { $ftotal += $row['amount']; ?> <tr> <td><b><?php echo $row['description'] ?></b></td> <td class='text-right'><b><?php echo number_format($row['amount']) ?></b></td> </tr> <?php } ?> <tr> <th>Total</th> <th class='text-right'><b><?php echo number_format($ftotal) ?></b></th> </tr> </table> </td> <td width="50%"> <p><b>Payment Details</b></p> <table width="100%" class="wborder"> <tr> <td width="50%">Date</td> <td width="50%" class='text-right'>Amount</td> </tr> <?php $ptotal = 0; foreach ($pay_arr as $row) { if($row["id"] <= $_GET['pid'] || $_GET['pid'] == 0){ $ptotal += $row['amount']; ?> <tr> <td><b><?php echo date("Y-m-d",strtotime($row['date_created'])) ?></b></td> <td class='text-right'><b><?php echo number_format($row['amount']) ?></b></td> </tr> <?php } } ?> <tr> <th>Total</th> <th class='text-right'><b><?php echo number_format($ptotal) ?></b></th> </tr> </table> <table width="100%"> <tr> <td>Total Payable Fee</td> <td class='text-right'><b><?php echo number_format($ftotal) ?></b></td> </tr> <tr> <td>Total Paid</td> <td class='text-right'><b><?php echo number_format($ptotal) ?></b></td> </tr> <tr> <td>Balance</td> <td class='text-right'><b><?php echo number_format($ftotal-$ptotal) ?></b></td> </tr> </table> </td> </tr> </table> </div> ) My WhatsApp number is +923409871374 Pls help me
  2. hi friends I have a dream weaver CC and wamp server ,so I have some problem when I need to access to my data bases server like this
  3. Hi I want to do this for many things on my php sites. Example: for ($a=1; $a<=60; $i++) { $result = $con->query("SELECT * FROM Users WHERE UserID <='". $a ."'" ); $row = $result->fetch_array(); and etc } Thanks.
  4. Good Afternoon, I am a newbie at php coding and sql, and I have started a site at work where the users can enter everything that they have done at work for the day including times and dates. I managed to get the information pulled through to my local DB (Wamp Server) Now I want the head of the department to be able to get reports and results from those pages using php. I am using check boxes for the head to choose what she wants to see..i.e: "<tr> <td class="grey"><p><span class="grey"> <input name="username" type="checkbox" class="User" id="username" value="48"/> User Name </span> </p> <p> <input name="requestedby" type="checkbox" id="requestedby" value="49"/> Requested By </p> <p> <input name="type" type="checkbox" id="type" value="50"/> Type </p> <p> <input name="memberno" type="checkbox" id="memberno" value="51"/> Member No </p> <p> <input name="scheme" type="checkbox" id="scheme" value="52"/> Scheme </p> <p> <input name="fromtime" type="checkbox" id="fromtime" value="53"/> From Time </p> <p> <input name="fromdate" type="checkbox" id="fromdate" value="54"/> From Date </p> <p> <input name="totime" type="checkbox" id="totime" value="55"/> To Time </p> <p> <input name="todate" type="checkbox" id="todate" value="56"/> To Date </p> <p> <input name="comments" type="checkbox" id="comments" value="57"/> Comments </p> <p> <input type="submit" value="Send"> <input name="Reset" type="reset" value="Clear"> " This look good, but i need the code to assist with (for example) the head of the department selects 3x tick boxes.i.e comments, username and fromtime, the information should then be taken from existing db's like..'stats' or systemletters' and then be complied in one page all together so that we can place that on a report? I hope this make sense. My wording is sometimes less understandable Please help.. I can send more info aswell if needed. (I have attached what I have come up with thus far) Thanking you in advance. show1.php
  • 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.