Connect to Mysql using PHP
<?php $con = mysqli_connect("localhost","username","password"); if (!$con) { die('Could not connect: ' . mysqli_error()); } mysqli_select_db($con,"your_database_name"); ?>
To display current date and time
<?php $current_date_time = date('Y-m-d H:i:s'); //in mysql storing format ?>
Convert date format from ‘d-m-Y’ to ‘Y-m-d’
<?php $dob = $_POST['dob']; //value get from the form $covert_dob = date("Y-m-d",strtotime($dob)); ?>
show a number to 2 decimal places
<?php $foo = "54.104"; echo number_format((float)$foo, 2, '.', ''); //output 54.10 $ful = "54"; echo number_format((float)$ful, 2, '.', ''); //output 54.00 ?>
Pampers Happy Sleep Pant Style Baby Diapers, Medium (M), 48 Count, 1 Pampers = 1 Night Sleep, with Anti Rash Shield, 7-12 Kg Diapers
₹475.00 (as of August 19, 2025 03:58 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Mee Mee Caring Baby Wet Wipes with lid, 72 Pcs (Aloe Vera, Pack of 3)
₹199.00 (as of August 19, 2025 03:58 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)LuvLap Glory Hands-Free Electric Breast Pump for Breastfeeding, Wearable, Portable, 4 Modes & 9 Suction Levels, Type-C Fast Charging, 24mm Breast Shield, Includes 19/21/27mm Soft Flange Inserts, White
Now retrieving the price.
(as of August 19, 2025 03:58 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)