html object that gets value from procedure
Posted: Fri Aug 22, 2025 5:31 pm
I have a html object on a launch form called vehicleins_today which has html of :
I have a procedure called get_vehicleins_today whos php is:
How do I call the procedure to pass the value to my html object? On Form Launch or custom code nuonLoad ? That's if procedure is correct.
Thanks in advance.
Code: Select all
<div id="vehicleins_card" style="
background: linear-gradient(135deg, #4e73df, #224abe);
color: white;
border-radius: 15px;
padding: 20px;
text-align: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
font-family: Arial, sans-serif;
width: 250px;
margin: auto;
">
<h3 style="margin: 0; font-size: 18px;">Total VehicleIns Today</h3>
<h1 id="vehicleins_total" style="margin: 10px 0; font-size: 40px;">0</h1>
</div>
Code: Select all
$sql = "SELECT COUNT(*) AS total FROM vehiclein WHERE DATE(date_in) = CURDATE()";
$r = nuRunQuery($sql);
$o = db_fetch_object($r);
echo (int)$o->total;
Thanks in advance.