Skip to main content

Posts

Showing posts from 2016

HOW MAKE A DATABASE CONNECTIVITY

Database Connection Process:      Here I Explained the database connectivity:- Server name kept here "localhost" , Username "root" , Password kept " " (blank), and keep the name of database as you are using for database name For example I used the name of the database is "exam" , and copy this code and you can use it for database connectivity for your website: <?php define('SERVER','localhost'); define('USERNAME','root'); define('PASSWORD',''); define('DATABASE','exam'); if(@$conn=mysql_connect(SERVER,USERNAME,PASSWORD))     {         mysql_select_db(DATABASE,$conn);     }     else     {         echo"<script>alert('opps!something went wrong with this connection!')</script>";         echo "<script>document.location.href='http://www.google.com'</script>";     } ?>

TWO DIMENSIONAL DATA IN TABULAOR FORM

Now Friends if your concept about array is cleared  so now  we can try to excute this 2D array in tabular form , that we clearly  understand  how data stores in an array  This is very easy concept I am sharing  to understand  how can we store the data in 2D array . For example:  <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>2D array</title> </head> <body> <?php error_reporting(0); $x=array( data_1=>array('name'=>'suraj kumar', 'dob'=> '20.10.1980', 'age'=> '30','salary'=>50000), data_2=>array('name'=>'Amit kumar', 'dob'=> '22.1.1990', 'age'=> '30','salary'=>40000), data_3=>array('name'=>'pankaj kumar', 'dob'=> '02.12.1990', 'age'=> '30','salary'=>20000), data...

EXAPLE OF TWO DIMENSIONAL ARRAY

Now look at the below example and try this two understand the how it works:- 2d array example:- <html> <head>    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />      <title>Untitled Document</title>  </head>       <body>           <?php            error_reporting(0);            $x=array(           data_1=>array('name'=>'suraj kumar', 'dob'=> '20.10.1980', 'age'=> '30','salary'=>50000),           data_2=>array('name'=>'Amit kumar', 'dob'=> '22.1.1990', 'age'=> '30','salary'=>40000),          data_3=>array('name'=>'pankaj kumar', 'dob'=> '02.12.1990', 'age'=> '30','salary'=...

Very Easy Concept To Understand An Array

Basic Concept of an Array  An array is a kind of data structure that can store fixed size of element, Most of time we can see two type of an array used in any basic program... 1D Array. 2D Array.  1D Array:- One Dimensional Array is a type of array that can store the data in either Row or Column . For exam array name[10]; 2D Array:- Two Dimensional Array can be capable to store the the data in two Row and also in  Column. For example array name[10][10]; Now look at the below example and try this two understand the how it works:- 1d array example:- <html >  <head>     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />       <title>1D Array</title>         </head>            <body>            <?php     ...

What is the use of Advance String functions:

Advance String functions: Here I am going to explain the Advance use and codes of string , you can just try this code and can learn the string functions. you can simply copy this code and use this code in Notepad++  and Dreamweaver and any other software that you have:-  Example: <!DOCTYPE html> <html > <head> <title>String Funtion</title> </head> <body> <?php error_reporting(0); if(isset($_REQUEST['submit'])) {     $value=$_REQUEST['value'];     $radiobutton=$_REQUEST[radiobutton];     if(empty($value))     {     echo"<script>alert('please enter the text in text box')</script>";     }     else     {     switch($_REQUEST['radiobutton'])     {         case 1:              ...

How can make a comment in php?

Comments: In PHP code, Comment is a line that is not executed but it helps to other to understand what are you doing in program and why you are using the comment line or it's work as a  reminder to know what you did in the program last time.      But there is many types of comment line like single line and multi line comments:  Example for Single line comment:   <?php     echo "<p>Hello my Friends</p>";   //This is a single-line comment   echo "<p>You will be a good please read all my blogs</p>"; ?> Here is another exaple of Multiple line comment "  example : <!--          --> <?php      <!--   echo "<p>Hello my Friends</p>";     echo "<p>Hello my Friends</p>"; -->        echo "<p>Hello my Friends</p>";     echo "<p>Hello my Friend...

why we use Echo ?

Echo: Echo is a fucntion that helps to get the output.If we say that it's not a function we would not be wrong, because Echo is a language construct.   For Exaple: <?php      echo"I Love Programming !";     echo"I am very Excited to learn php !";     echo "www.protechnologyme.blogspot.in"; ?>

PHP DATE AND TIME CODE

Hi........... Today we will try how Can I use date and time in our website. <!DOCTYPE > <html >    <head>      <title>Untitled Document</title>   </head>       <body>             <?php              echo "Today is " . date("Y/m/d") . "<br>";              echo "Today is " . date("Y.m.d") . "<br>";              echo "Today is " . date("Y-m-d") . "<br>";              echo "Today is " . date("l");            ?>     </body> </html >

Why Use Css

Use of CSS:- Use of Css to define styles for your documents,Including the Design, layout and Variations indisplay for different devices and screen sizes. you can place your css in <head> of the document with ab embedded style sheet, or attach a separate file that defines your style with an external style sheet.To link an styles sheet to your document, you will simply add a link to the style sheet in the <head> of the document. An external style sheet has many advantages.keeping the styles separate from your HTML content: Helps avoid Duplication . Makes maintenance easier. Allaws you to make a site-wide change in one place For example:-  you want to store the style information in common files that all the pages share. For example,when the documents link to the same style sheet that defines the color of h2 header, you can apply the syle for h2 header tags globally by changing one css attribute. What is java script?   Java script is a programmin...

How HTML works?

WORKS OF HTML: HTML consists of a series of short codes typed into text-files. The text is then saved as a html file, and viewed through a browser, like Internet Explorer or Netscape Navigator. This browser reads the file and translates the text into a visible from, But always remember that when you are using tags then be careful about using a correct tags and much close </> . If you see you page looks very simple it means you are youing only HTML codes . so if you want your pages looks attractive you must have to use CSS (Cascading Style Sheets ). What is CSS? Cascading Style Sheets(CSS) is a language for specifies how should your document or page show  infront of viewers and they can look for your web pages. here is a question in your mind the is " what means about document "?. A Document is a collection of information that is structured using a markup language. Presenting a document to a viewers means converting it into that form that a user can Browse a...

What is veriables?

Variables are "containers"that can  storing information.  PHP, a variable starts with the $ sign, followed by the name of the variable.   For example:- <?php $txt = "Hello!" ; $x = 5 0; $y = 101.5 ; echo $txt; echo "<br>" ; echo $x; echo "<br>" ; echo $y;   ?>            Here php starts with "<?php" and end with "?> " , and  $ sign used to declare variable. now $text  stores a string value , $x will stores the numeric value and $y stores the decimal values simultaneously. So now we have to print this values in output. therefore we use echo for print the output value.      

PHP on Your PC

If  your server does not support PHP, you must: install a web server(wamp,xamp,appache) install PHP install a database, such as MySQL Before starting the installation, first you need to know what do you want to use PHP for.   Websites and web applications (server-side scripting) Command line scripting Desktop (GUI) applications   First and most common form, you need three things: PHP itself, a web server and a web browser. You probably already have a web browser, and depending on your operating system setup, you may also have a web server (e.g. Apache on Linux and MacOS X; IIS on Windows). You may also rent webspace at a company. This way, you don't need to set up anything on your own, only write your PHP scripts, upload it to the server you rent, and see the results in your browser. In case of setting up the server and PHP on your own, you have two choices for the method of connecting PHP to the...

What is PHP?

What is PHP? PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use What is a PHP File? PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ".php" What is a PHP File? PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ".php"

More Clear descroption about php language

What is the main part of php and why you should learn Php?   PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP . First Php program for self practice! <!DOCTYPE html>   <html>     <body>          <?php             echo "This is my first PHP  program !";         ?>    </body>   </html >    Now first open a notepad or notepad++ or Dream weaver and copy this code and try to save this with extension .php using wampor xamp  server, inside C:/ drive folder www and , if you do not have wamp server please download this and install first and then , open the and see in your taskbar in right side below  , and open PHPMYADMIN ,...

What can you do with PHP

PHP is mainly focused on server-side scripting: There are three main areas where PHP scripts are used.  Writing desktop applications. PHP is probably not the very best language to create a desktop application with a graphical user interface. PHP can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, and probably others. PHP has also support for most of the web servers today. This includes Apache, IIS, and many others. And this includes any web server that can utilize the Fast CGI PHP binary, like light tpd.  There is many example which is made with the help of PHP. like Facebook, Whats App. and many other bussiness purpose software.                                   One of t...

Upload file to a server with PHP

If you do not understand how to upload files  to a server  with PHP , Do not worry my friends . I am here for help you .just watch this video and learn step by step in this Full video . And here you can see you concept will also be clear and you will be confident to work with Php . Please watch the complete video and like and also subscribe.