Home Blog Page 15

How to store the data in unicode in hindi language.

0

welcome back to shortlearner.com, in the previous post we learn how to track active users location on google map with the help of PHP and google map API.
Today we will see how to insert Hindi font into MySQL database.
we will complete us this task into three steps.
in the very first step we will create a database with the name of “hindi_fonts“, and also create a database table “user_details” which have to column the first one is id and another one is user_name.
in the second step, we will insert the user’s name (Hindi font) into the database.
in the final step, we will fetch all the inserted record and shows in HTML table format.

Create Database

CREATE DATABASE hindi_fonts
    CHARACTER SET utf8
    COLLATE utf8_general_ci;

USE hindi_fonts;

CREATE TABLE `user_details` (
    `user_name` varchar(200) COLLATE utf8_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

index.php

<!DOCTYPE html>
<html>
<head>
	<title></title>
	`<meta charset="UTF-8">`
</head>
<body>
<?php 
if(isset($_POST['submit']))
{
	$con= mysqli_connect("localhost","root","rootpassword","hindi_fonts");
	mysqli_set_charset($con,'utf8');
	$qry= "INSERT INTO user_details(`user_name`)VALUES ('".$_POST['user_name']."');";
	$result= mysqli_query($con,$qry);

}
?>
<form method="post" action="">
<input type="text" name="user_name">
<input type="submit" name="submit">
</form>
</body>
</html>

Fetch.php

<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="UTF-8">`
</head>
<body>
<h2>Users Information</h2>
<table>
<tr><td>USER NAME</td></tr>
<?php 
$con= mysqli_connect("localhost","root","rootpassword","hindi_fonts");
	mysqli_set_charset($con,'utf8');
	$qry="SELECT * FORM user_details;";
	$result= mysqli_query($con,$qry);
	while($row= mysqli_fetch_array($result))
	{
?>
<tr><td><?php echo $row['user_name']; ?></td></tr>
<?php 
	}

?>
</table>
</body>
</html>

 

show active visitor on google map using php

0

Welcome back to shortlearner.com, In our previous post we learn how to change password script is run in php.
Today we will learn how to get the user’s current location from the browser and show multiple locations mark on the map.
get visitor location using php
before starting this tutorial, first of all, we make a scenario to perform this task. we split this task into 4 parts.

Change password using javascript, php and mysqli.

0
<?php
session_start();
if(!$_SESSION['name'])
{?>
<script type="text/javascript">window.location.href='index.php';</script>
<?php
}
?>
<?php
if(isset($_POST["changepsw"]))
{
$name = $_SESSION['name'];
$oldpsw= $_POST["oldpsw"];
$newpsw= $_POST["newpsw"];
$conpsw= $_POST["conpsw"];
require("connection.php");
$qry1 = "SELECT * FROM user where name='$name';";
$re = mysqli_query($con,$qry1);
$row = mysqli_fetch_array($re);
$dbpsw= $row['password'];

if($dbpsw==$oldpsw)
{

if($newpsw==$conpsw)
{

$qrys="UPDATE user SET password='$newpsw' WHERE name='$name';";
$results= mysqli_query($con,$qrys);
if($results==true)
{
session_destroy();
?>
<script>alert("Password Change Successfully");
window.location.href = "index.php";
</script>
<?php
}
else
{
?>
<script>alert("Password Not Changed");
window.location.href = "change-psw.php";
</script>
<?php
}
mysqli_close($con);
}
else
{
?>
<script>alert("Password Not Matched");
window.location.href = "change-psw.php";
</script>
<?php
}
}
else
{
?>
<script>alert("Old password is wrong");
window.location.href = "change-psw.php";
</script>
<?php
}
}
?>

Welcome back to shortlearner.com , today we will see how to change password using JavaScript, PHP and MySQL.
first of all we should discuss about overall scenario which we used to reset password.
In first step we make a form (which have three input fields) with the help of HTML, CSS and Bootstrap.

change password in php
In the second step we match the new password and confirm password with the help of JavaScript.
in case if new password and confirm password are not matched than we will disable the submit button with the help of JQuery.

How to create Splash screen in your Android app

0

Welcome back to shortlearner.com, in our previous post we learn the complete installation process of android studio.
today we learn what is splash activity and how to create it.
first of all we should know about what is splash activity, so basically splash screen is the user’s first experience of your application.

It normally used to display some kind of progress before the application setup completely.it is a simple constant screen for a fixed amount of
time which is used to display the company logo, name, advertising content etc.This tutorial will help you to learn How to create Splash screen in your Android app.

Android Studio Installation in Windows

0

Welcome back to shortlearner.com, today we will start our new tutorial series for those who are new to Android platform.
Today i will briefly introduce the android development platform, then show you how to download,install and run the software.

how to download,install and run android studio

About Android Studio

Before start the installation process, we take a look about android. so guys basically android studio is Google’s officially supported IDE for developing Android Apps.
The current version of android studio is 3.2.1, which was released in October 2018.