Home Blog Page 14

How insert multiple values into MySQL from multiple select option

0
Insert Multi select form into database

welcome back to shortlearner.com, in the previous post we see how to create a dynamic pie chart with the help of PHP and MySQL. In this post, we will see how to insert data into the MySQL database from multiple select lists using PHP.

 

Below are the steps to do this :
Firstly we have created a test database and after creating a database created a table state inside it and in the state table, we have stored all the states name in it.

multiselect drop down with checkbox

How to use Opera With Cookies.?

0

Welcome back to shortlearner.com, In this post, we will see how to use opera browser with high CPC cookies.
before starting this tutorial, first of all, we should know about what is cookies and what are the benefits of importing cookies in the browser.

how to import cookies in browser

make a dynamic pi-chart with the help of PHP

0

make a dynamic pi-chart with the help of dynamic pi chart

welcome back to shortlearner.com, in this post we will see how to make a dynamic pi-chart with the help of PHP , MySQL and google charts. most of the time we need to show all reports in a graphical format, so we use pi-chart or other graphical charts.

In this tutorial we will write a PHP script which is helped to show programming language ratings on the pi -chart.
in the very first step we create a database with the name of pi, and also create a database table with the name of programming_languages, in this database we add 4 column (id, name,rating,staus).

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.