Posts

Showing posts from November, 2019

How to Create User Registration and login using Stored Procedure in PHP

Image
In this article, you will learn How to Create User Registration and log in  using Stored Procedure in PHP registration table CREATE TABLE `registration` ( `id` int(11) NOT NULL, `name` varchar(200) NOT NULL, `email` varchar(200) NOT NULL, `password` varchar(255) NOT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; db.php <?php $con = mysqli_connect("localhost","root","","db"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } ?> index.php <html> <head> <title>Register Using Store Procedure</title> </head> <body> <form class="form-horizontal" method="post"> <fieldset> <div id="legend"> <legend align="center" style="font-size: 35px;">Register</legend> </div> <div class

How to Get Current Indian Standard Time using PHP

Image
In this article, we will explain How to Get Current Indian Standard Time using PHP on web browser follow below code Firstly Set Indian time zone: date_default_timezone_set('Asia/Kolkata'); Now create a PHP date or time function : date( 'd/m/Y h:i:s', time ()); Full Code in PHP <?php date_default_timezone_set('Asia/Kolkata'); $currentTime = date( 'd-m-Y h:i:s A', time () ); echo $currentTime; ?> For Full article Click here