Saturday, January 3, 2009

Echo Function with example

Php scripting always start with . Php scripting can use anywhere in html file. Just using this tag .
and terminate with
Echo is means of ouputting text to the web browser. To output a string you can place either string variable or you can use quotes . Like we do below:-


$str=”Hello guys!”;

echo $str;

echo “ this is my first php program”;

?>




output:-

hello Guys!
This is my first program.




In php no need to define type of variable and to declare the variable . Like in above program str variable will automatically of type string. If we give some value to str example:- 3 than variable type will be interger.

Sunday, December 21, 2008

How to Connect Database

You know every body fright with connectivity.Actually no body knows when we want to connect our site with database then we just need only two lines.Those lines are very elementary.These are :-
[code]

$link= mysql_Connect("localhost","root","");
mysql_Select_db("database name",$link);
?>
[/code]
When you want to connect database with site then you would first create the database.Then you can connect with database.When you install php then php database automatcally installed with php.Just start all services of php and then click on the phpmyadmin.Then your browser will be open .

Thursday, December 18, 2008

how install php

let's finally start learning PHP.

PHP is power server side scripting language for creating dynamic and interactive websites. The syntax of php is similar to perl and c .To learn PHP first of all you need to install apache,php,mysql to run php file . You will need to install xamp or wamp to run php. You can install wamp from here.. (or) form php.net site just click on download wamp sever button. Installation will begin, after downloading this wamp.Surely you will see icon on taskbar.Just click on this icon choose option and start all services . Afterward click on localhost. I will be back with the next program.

Saturday, December 13, 2008

Begining PHP

hi Guys, How r u ? Now, I am here to teach you web desiging.You Know, I am feeling very exciting.I hope my blogging journey will be very enjoyable. As I know every person wants to become a web designer. But Courses are too expensive. Every person cann't afford course fee. So I want to assist my friends. So I started this blog.
I will instruct u mainly php here.As You know, PHP is a new trend for creating dynamic sites. Do u know what's the meaning of dynamic web pages. I think that is my first topic to reveal here.
Dynamic sites means those sites which are connected with database. Connecting database means fetching,inserting,and deleting data in database. And Static means just providing information to visitors.Some persons know how to design website but don't know how to connect and use database.I'll tell u everything here. Just keep in touch.Ohhhhhhh, I was blankout to share something But Now I w'll give u a amazing surprise with in coming days.It will be a New Year Surprise. Lets wait and watch..