Author Archives: prasad
Gmail Compose Message New Interface
Gmail compose message new interface looks awesome when compared to old one. Google has introduced a new interface in gmail's compose message. In older version of gmail's compose, a new window will opened to send a mail, this new interface makes us to send mail without losing our current page. The new interface of composing mail is looks like a larger chat pop-up.
This new email interface makes us to compose and send emails faster.
Auto suggest email option also looks very cool, it displays their email, first name and last name.
Compose mail having some i
How To: Insert Data into Database using Check Box in PHP
Here i am going to insert data into mysql database using checkbox in php script. In radio button, only one option have to be selected under many option and all that options name will be same. In Checkbox also same as the radio button's properties, but the difference between them is many options can be selected in checkbox. So that name of check box is to be given in array ( game[])
Create database "data" and table "tb".
[code type=sql]
CREATE TABLE
`data`.`tb` (`id` VARCHAR( 25 ) NOT NULL ,
`choice` VARCHAR( 5 ) NOT NULL)
ENGINE = INNODB;
[/code]
Simple PHP Code To Upload Files
In this tutorial i have given the simple php code to upload files into server directory. To upload file <form> should contain enctype="multipart/form-data", input type is file.
$_FILES['photo']['name'] - This will give the name of the uploaded file
$_FILES['photo']['tmp_name'] - Temporary name will be created for file to be uplaoded.
$_FILES["file"]["type"] - Returns file type i.e., format of the file. If the file is image (pic.jpg), then this will return .jpg
$_FILES["file"]["size"] - Returns size of the file, which we have uploaded.
$_FILES["file"]["error"] - Erro
How To: Remove Space from String in PHP
Spaces in a string will makes problem, when that string is to used as username or password. There are many php functions available to remove the space from string. Here we are going to see removing spaces from strings in php using php functions. Some of them are
trim()
rtrim()
str_replace()
Need of removing space from string
In user registration, username and password shouldn't have spaces.
Allowing empty sting make the security breach in our website.
User may give space in any field, then it will be taken as a value and creates error. To avoid this we are removing spaces
Best 3 WordPress Plugins for Related Posts/Content
Displaying related posts or content in an article is a important tactics to get more visitors and reduce bounce rate. There are so many plugins available, here i have given best three wordpress plugins to display related articles.
Nrelate Content
nrelate content plugin is the widely used plugin to show. Yoast SEO plugin have given 3 stars for this plugin. There are two options available in this plugin text mode and thumbnails. In text mode, title of the relate article and link to that article will be provided. In thumbnail, thumbnail for the article will be displayed with the article tit
How To: Develop Facebook Application using Heroku
The Programmers who know php or ruby can easily develop a facebook app. To create a facebook app required thinks are
Domain name
Server space with https server
programming skill on php or python or Ruby
But most of the programmers didn't have server space. Even though they are pick some free server space, it doesn't have https connection. To solve this facebook intriduced heroku, if we dont have server space, then we can easily host our app in this domain for free.
Creating the facebook application using Ruby On Rails or PHP is a difficult task, where as using applications Herok
Difference Between Client Side and Server Side Language
June 16, 2012
Programming Author: prasad
To create a webpage, client side and server side code are used. For dynamic webpage server side language is needed, but for any type of webpage either it is dynamic or static page client side language like HTML is necessary.
Client Side
Client side language is very necessary to build a webpage, this languages are executed in client browser ( IE, Firefox, Chrome, opera ).
Some of the client side languages are
HTML
XML
Javscript
jQuery
Server Side
Server side codes are executed in server and result will be displayed in web browser as either HTML or XML format. client Bro
Php Code to Get Current Webpage URL
PHP having the super global variables $_SERVER to get currently using page URL
URL - http://www.tobbynews.com/page/2.php
$_SERVER['PHP_SELF']
PHP_SELF will return the currently working webpage with their directory path ( /page/2.php )
$_SERVER['SCRIPT_NAME']
SCRIPT_NAME is introduced in CGI, and it also returns the currently working webpage ( /page/2.php )
$_SERVER['HTTP_HOST']
HTTP_HOST is a client controlled value and returns domain name (http://www.tobbynews.com)
$_SERVER['SERVER_NAME']
SERVER_NAME is server controlled value (http://www.tobbynews.com)
$_SERVER['REQUES
How To: Insert Data into MySQL Database Using Drop Down Box in PHP
Using PHP and Mysql, we can store data obtained from drop down box into mysql table. The biggest reason for using drop down box is it allows user to only one option only i.e., limited options. A question may arise radio button also gives this functionality of selecting of only one option, but what is special in drop down box? Reason is more options can be given with low area (space in webpage) and can easily fetch by typing first letter of the option.
Read also: How To: Insert Multiple Values Using Dropdown List Box in PHP
Create database "data" and table "tb".
[code type=sql]
PHP Code to Get Previously Visited Page URL
In some situation, previously visited page URL will be needed. In a website, which having login form will need previous page URL. When user is requesting a webpage that page will be shown only when user is logged on, if user is not yet logged in then page will be redirected to login page, after successful login, page will be redirected to previously visited page (page, where he has redirected)
First open the index.php page, then click the link and navigate to page.php page there previous page's URL will be shown. If we open page.php webpage without navigating from index.php page won't gi






