Blogger news

#1146 - Table 'phpmyadmin.pma_table_uiprefs' doesn't exist,phpmyadmin,how to solve

#1146 - Table 'phpmyadmin.pma_table_uiprefs' doesn't exist,phpmyadmin,how to solve
 phpmyadmin reported the accompanying blunder

"
# 1146 – Table "phpmyadmin.pma_table_uiprefs" doesn't exist"

Alter the setup document config.inc.php phpmyadmin
$ Cfg ['servers'] [$ i] ['table_uiprefs'] = 'pma_table_uiprefs';

Changed to: $ cfg ['servers'] [$ i] ['pma__table_uiprefs'] = 'pma__table_uiprefs';

Restart apache, page log to re-enter, critical thinking

# 1146 – Table "phpmyadmin.pma_table_uiprefs" doesn't exist
create a robots txt file blogger,add robots.txt to blogger Robots.txt?

What is Robots.txt?

     Robots.txt could be a computer file that contains few lines of straightforward code. it's saved on the web site or diary’s server that instruct the net crawlers to a way to index and crawl your blog within the search results. meaning you'll be able to prohibit any web content on your diary from net crawlers so it can’t get indexed in search engines like your diary labels page, your demo page or the other pages that don't seem to be as vital to induce indexed. continually keep in mind that search crawlers scan the robots.txt file before locomotion any web content.



Each diary hosted on blogger have its default robots.txt file that are some things seem like this:

User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /search
Allow: /
Sitemap: http://example.blogspot.com/feeds/posts/default?orderby=UPDATED


Adding Custom Robots.Txt to Blogger
Now the most a part of this tutorial is a way to add custom robots.txt in blogger. therefore below ar steps to feature it.

create a robots txt file blogger,add robots.txt to blogger Robots.txt?
create a robots txt file blogger,add robots.txt to blogger Robots.txt?


--->Go to your diaryger blog.
Navigate to Settings ------->Enter
                                                   Search Preferences ------> Enter
                                                                                          Crawlers and categorization ------>
                                                                                      Custom robots.txt -------> 
                                                                                        Edit -------> 
                                                                                                           Paste Above Code ------>Save
Now paste your robots.txt file code within the box.
Click on Save Changes button.

You are done!
php get and post methods,php difference between get and post method,php get post request method

PHP GET and POST methodology – phptaab

While addressing the forms, info are often submitted and transferred to same or another page. To send submitted information through type, one will use GET & POST methodology to try to to that in PHP.

A type information are often submitted exploitation these 2 ways. each area unit used for same purpose however stands apart below some specifications. As in GET methodology key values area unit passed within the uniform resource locator whereas in POST, the data transfers during a hidden manner.

php get and post methods,php difference between get and post method,php get post request method


A type submitted info is appended in to the uniform resource locator within the variety of question String consisting of name=value pairs in uniform resource locator. This string contains user values/data, that area unit separated by punctuation and areas area unit replaced with + sign.


We have lined heap of examples during which, we tend to set methodology attribute of type to urge or POST. Let’s discuss regarding them in details.



>   GET methodology

As explained higher than, before causing any info , it converts values/data  into a question  string in uniform resource locator called uniform resource locator secret writing. that contains each page link and encoded info separated by the ? character.

Client Side: Below code is AN hypertext markup language type with method=”get” for user to fill info.

<form action="#" method="get">
<input type="text" name="name" placeholder="Your Name"></input><br/>
<input type="text" name="email" placeholder="Your Email"></input><br/>
<input type="text" name="contact" placeholder="Your Mobile"></input><br/>
<input type="submit" name="submit" value="Submit"></input>
</form>


Server Side: Below code has PHP script wherever, $_GET associative array is employed to receive sent info at server finish.

<?php
if( $_GET["name"] || $_GET["email"] || $_GET["contact"])
{
echo "Welcome: ". $_GET['name']. "<br />";
echo "Your Email is: ". $_GET["email"]. "<br />";
echo "Your Mobile No. is: ". $_GET["contact"];
}
?>

Above question string of data, generated by Get technique are often clear in address bar so, ne'er use Get technique for causation sensitive data to server.

One ought to avoid use of this technique to send binary knowledge like, pictures or Word Document file to the server.

 

>  POST technique

As explained on top of, before causation data to server, it converts client’s data into a question  string in computer address.

Client Side: Below code is Associate in Nursing markup language type with method=”post” for user to fill data.
<form action="#" method="post">
....
</form>

Server Side: Below code has PHP script wherever, $_POST associative array is employed to receive sent data at server finish.
<?php
if( $_POST["name"] || $_POST["email"] || $_POST["contact"])
{
echo "Welcome: ". $_POST['name']. "<br />";
echo "Your Email is: ". $_POST["email"]. "<br />";
echo "Your Mobile No. is: ". $_POST["contact"];
}
?>

Query string , generated by Post technique ne'er seems in address bar i.e. it's hidden for the user so, we will use this technique for causation sensitive data to server. Moreover, we will create use of this technique to send binary knowledge to the server with none restrictions to knowledge size.


In our example, we have a tendency to enable user to settle on {a technique|a way|a technique} via radio button and this price is appointed to form’s method attribute.

$("input[type=radio]").change(function(){
var method = $(this).val();
$("#form").attr("method", method);   // Assigns Method Type From Radio Button
});

Create Form Dynamically And Increment Value,javascript,phptaab,php taab

How To Dynamically Add kind Fields And Increment “Name” Attribute Of the sector phptaab

In this tutorial you'll learn-how {to make|to kind|to create} dynamic form with JavaScript codes. The fields ar dynamically supplementary within the kind. With it, “Name” and “message” fields get incremented on click of various buttons.


index.php

<!DOCTYPE html>
<html>
<head>
<title>Create Form Dynamically And Increment Value- Demo Preview</title>
<meta content="noindex, nofollow" name="robots">
<script src="form.js" type="text/javascript"></script>
<link href="form.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="main">
<div class="header">
<h1>Create Form Dynamically And Increment Value</h1>
</div>
<!--
=================
First Div for the buttons. Click on the button to add field on the forms.
=================
-->
<div class="two">
<button class="name" onClick="textBoxCreate()">Name</button>
<button class="email" onClick="emailBoxCreate()">Email</button>
</div>
<!--
=================
Form fields get added in the third div.Click on the button to add field on the forms.
=================
-->
<div class="third">
<form action="" id="mainform" method="get" name="mainform">
<p id="myForm"></p><input type="submit" value="Submit">
</form>
</div>
</div>
</body>
</html>

form.js

// FormGet Online Form Builder JS Code
// Creating and Adding Dynamic Form Elements.
var i = 1;// Global Variable for Name
var j = 1;// Global Variable for E-mail
/*
=================
Creating Text Box in the Form Fields.
=================
*/
function textBoxCreate(){
var y = document.createElement("INPUT");
y.setAttribute("type", "text");
y.setAttribute("Placeholder", "Name_" + i);
y.setAttribute("Name", "Name_" + i);
document.getElementById("myForm").appendChild(y);
i++;
}
/*
=================
Creating Textarea in the Form Fields.
=================
*/
function emailBoxCreate(){
var y = document.createElement("INPUT");
var t = document.createTextNode("Email");
y.appendChild(t);
y.setAttribute("Placeholder", "Email_" + j);
y.setAttribute("Name", "Email_" + j);
document.getElementById("myForm").appendChild(y);
j++;
}
}

DOWNLOAD All FILES

You can take a read on screenshots that shows dynamically addition of kind parts.

As we have a tendency to click on the fields, they'll seem on the proper aspect. during this method, you'll be able to dynamically add fields and make kind.

Create Form Dynamically And Increment Value,javascript,phptaab,php taab


Conclusion Words:

To create dynamic kind via code snipping is quiet troublesome. currently it’s simple for your to transfer the codes and use it on your project.
Auto Complete Text Box With PHP,Javascript,JQuery and MySql phptaab

Creating info table

We need to form a table in our info before writing our script. I conjointly add some information for this table. Import following SQL statement via phpMyAdmin or the other MySQL tool.

CREATE TABLE `tag` (
  `id` int(20) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

INSERT INTO `tag` (`id`, `name`) VALUES
(1, 'php'),
(2, 'php frameword'),
(3, 'php tutorial'),
(4, 'jquery'),
(5, 'ajax'),
(6, 'mysql'),
(7, 'wordpress'),
(8, 'wordpress theme'),
(9, 'xml');

autocomplete.php
This file is termed from our jquery script. This php script is simple to follow.

<?php
$q=$_GET['q'];
$my_data=mysql_real_escape_string($q);
$mysqli=mysqli_connect('localhost','root','','autofield') or die("Database Error");
$sql="SELECT name FROM tag WHERE name LIKE '%$my_data%' ORDER BY name";
$result = mysqli_query($mysqli,$sql) or die(mysqli_error());
if($result)
{
while($row=mysqli_fetch_array($result))
{
echo $row['name']."\n";
}
}
?>

index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Auto Complete Input box[phptaab.blogspot.in]</title>

<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.autocomplete.js"></script>

<script>
$(document).ready(function(){
 $("#tag").autocomplete("autocomplete.php", {
selectFirst: true
});
});
</script>
</head>

<body>
    <label>Tag Name:</label>
    <input name="tag" type="text" id="tag" size="20"/>
</body>
</html>

jquery.js

jquery.autocomplete.js

DOWNLOAD

jquery.autocomplete.css

DOWNLOAD

We have done. Run your project and kind in your text box you'll see following screenshot. 

Auto Complete


By the way, i exploit the recent jquery insert this project. If you would like to find out new issue, you'll be able to learn here and here. I produce this tutorial as a result of it's still helpful and simple, though it's too recent.    If You like this Don't Forget pin a COMMENT
install xampp on windows 7,XAMPP,ubuntu installation steps with screenshots


STEP 1 ::

    Download the software system from: http://www.apachefriends.org/en/xampp-windows.html#641
Select the Installer choice beneath the fundamental Package. you'll be taken to a page that presents you with a bunch of various transfer locations. simply click one in all the transfer buttons, so save the file to your desktop. Once downloaded, the installer works like most Windows installers.

In web somebody, you'll get a warning regarding downloading the file. Click the yellow info bar that seems on top of the online page in id est, and select transfer File…

STEP 2 ::

    Double-click the .exe file you downloaded.
A window opens, asking you to pick the language you’d wish to use.

If a warning dialog seems click the "Allow" choice to install XAMPP.


STEP 3 :: 

    Choose a language from the menu, so click OK.
A Setup Wizard window seems, able to step you thru the setup method.

In visual percept you'll see a message warning you that XAMPP might not work once put in within the C:\Program Files directory. The default installation is in C:\XAMPP therefore you don’t need to worry regarding this drawback.


STEP 4 ::

   Click consecutive button.
The installer suggests golf stroke the appliance on your main drive at C:\XAMPP. you'll just about install it anyplace, however with the visual percept package you'll encounter issues if you put in it in C:\Program Files.

STEP 5 ::

Click consecutive button once more.
The XAMPP choices window seems (see below). In most cases, it’s fine to go away all the window’s checkboxes even as you see; see the note below for details.

install xampp on windows 7


Installing XAMPP
If you intend on doing plenty of development, day in and time out, you may need to show on the “Install Apache as service” and “Install MySQL as service” checkboxes. A service starts up when you switch on your laptop, so Apache, PHP, and MySQL ar perpetually running. However, if you won’t be building information sites oft, otherwise you don’t have plenty of RAM in your laptop, don’t activate these boxes (you’ll simply need to manually begin the servers after you want to make dynamic pages, mistreatment the XAMPP board delineated  on consecutive page).


STEP 6 ::

Click Install.
The installer places all the files onto your system. This method takes a minute, since plenty of programs and files ar being put in.


STEP 7 ::

Finally, click the end button.
A window seems “congratulating” you (way to double-click the installer program!), and asking whether or not you would like to begin the XAMPP board.

STEP 8 ::

Click Yes, to open the XAMPP board (see screenshot below).
The XAMPP board allows you to begin and stop the Apache net server and MySQL information server.

install xampp on windows 7


In this figure, each Apache and MySQL ar presently NOT running, as indicated by the word begin to the correct of their names. Click the beginning buttons to show the servers on. you'll open the board by clicking the XAMPP board route on your desktop.


STEP 9 :: 

     If the buttons to the correct of Apache and MySQL say begin, click them to begin the online server and therefore the MySQL information server.

  You probably get a Windows security alert regarding each MySQL and Apache: Click the Unblock button in each cases. This action permits the 2 servers to run, and tells the Windows firewall protection service that everything is OK.If Apache and MySQL ar already running, these buttons say Stop. (Clicking them turns off the online server and MySQL.) Whenever you begin Apache, PHP mechanically starts in addition. At now, you ought to have a whole testing server running on your machine. you simply have to be compelled to certify it’s operating.


STEP 10 ::

To do so, launch an online browser, and, within the Location bar, sort 
http://localhost/.

You encounter a page that lists a bunch of languages; click the language you favor, and you’re taken to a form of Web-based board for XAMPP (see screenshot below).


install xampp on windows 7

Once put in, you'll read your XAMPP home page from http://localhost/xampp/. From the left-hand list of links, you'll access useful programs and knowledge, like phpMyAdmin (for operating with the MySQL database) and phpinfo() for locating out a lot of regarding the server setup.

Once you’ve put in XAMPP, you’ll see a route referred to as XAMPP board on your desktop. Double-click this icon to manage the servers you’ve simply installed you will flip the servers off and on, in addition as flip them into services (which launch every time you begin up your computer).

To uninstall XAMPP, simply visit the placement wherever you put in XAMPP (like C:\XAMPP\) and run the program named Uninstall.exe. This action, however, deletes any databases you created, and destroys any sites that you simply placed on the server. to stop this method, simply follow these steps: initial, use phpMyAdmin to export any information you would like to avoid wasting (you will notice directions at http://php.about.com/od/learnmysql/ss/mysql_backup_3.htm), so create a replica of your sites that ar situated within the C:\XAMPP\htdocs folder.

Hosts

You can even have multiple internet sites running simulatneouly on your laptop, every with separate "virtual domains" that you simply will access severally. for instance, writing http://clientA/ during a browser can show the positioning for consumer A, and http://clientB/ can show the positioning for consumer B. Here ar directions for fixing Virtual Hosts with XAMPP.

What is Session in PHP, Session Variables, PHP Session Functions,session in php Using

PHP Session Variables :

           When you square measure operating with associate degree application, you open it, do some changes and so you close up it. this can be very like a Session. the pc is aware of World Health Organization you're. It is aware of once you begin the appliance and once you finish. however on the web there's one problem: the online server doesn't understand World Health Organization you're and what you are doing as a result of the protocol address does not maintain state.

             A PHP session solves this downside by permitting you to store user data on the server for later use (i.e. username, searching things, etc). However, session data is temporary and can be deleted when the user has left the web site. If you would like a permanent storage you'll need to store the info during a info.

Sessions work by making a singular id (UID) for every traveller and store variables supported this UID. The UID is either keep during a cookie or is propagated within the address.

Starting a PHP Session : 

     Before you'll be able to store user data in your PHP session, you need to initial commence the session.

(or)

         An associative array containing session variables on the market to the present script. See the Session functions documentation for additional data on however this can be used.

$HTTP_SESSION_VARS contains identical initial data, however isn't a superglobal. 
(Note : that $HTTP_SESSION_VARS and $_SESSION square measure completely different variables which PHP handles them as such)

(or)

           Session support in PHP consists of some way to preserve bound information across resulting accesses. this allows you to make additional custom-made  applications and increase the attractiveness of your electronic computer. All data is within the Session reference section.

Note: The session_start() operate should seem BEFORE the  tag.



         The code higher than can register the user's session with the server, permit you to start out saving user data, and assign a UID for that user's session.

Storing a Session Variable :
The correct thanks to store and retrieve session variables is to use the PHP $_SESSION variable:


session_start();
// store session information
$_SESSION['views']=1;
?>

//retrieve session information
echo "Pageviews=". $_SESSION['views'];
?>



Output:

Pageviews=1

        In the example below, we have a tendency to produce a straightforward page-views counter. The isset() operate checks if the "views" variable has already been set. If "views" has been set, we will increment our counter. If "views" does not exist, we have a tendency to produce a "views" variable, and set it to 1:


session_start();

if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];
?>

Destroying a Session :
    If you want to delete some session information, you'll be able to use the unset() or the session_destroy() operate.

The unset() operate is employed to free the desired session variable:


session_start();
if(isset($_SESSION['views']))
  unset($_SESSION['views']);
?>

You can conjointly utterly destroy the session by business the session_destroy() function:


session_destroy();
?>


Note: session_destroy() can reset your session and you may lose all of your keep session information.

using session in php