Build your professional network on facebook via our app Go to app
 
<< Prev  3 of 3 in Topic 
Associated with other topics :
  Rate : 
 
Industry : technology Functional Area : Web 2.0 +
Activity:  4 comments  1728 views  last activity : 07 06 2010 20:18:04 +0000
 Refer 10
Share
 
 
 

PHP is serverside scripting language which can be used along with other web technologies such as javascript(which is client side) and ajax  to make interactive web pages. Websites also need databases to store information about users. In this post I want to share what I know is possible using these.

 Whenever you open a webpage it's loaded from a webserver usually and that page is not dynamic in nature. With the help of javascript you can make dynamic pages and with ajax and javascript both combined together you can make certain parts of page dynamic. Dynamic functionality can also be made possible with the use of socket/listening server which keeps on listening on a port for any messages but I will not go into specific details on how its done since this post is about general concepts.

 Using PHP and MySQL database: You can make user interface for users who can login to your website with login and password.

Using PHP and Javascript: You can introduce dynamic behaviour into your webpage which otherwise is static. As an example in javascript one has an option of keep on calling different javascript functions on different actions of the user like mouseclick, keyboard input etc. Moreover you can keep track of server time and make some function execute only after certain period of page loading.

Using PHP and Javascript and Ajax: You can pass javascript variables to php and display the result from php file on a specific location on HTML page. As an example you have an HTML page with a form. On clicking submit button, a javascript function is called with the value chosen in the form. That javascript function uses XMLHttpRequest object of ajax and sends value of that variable to another PHP file. Depending on the value of that variable PHP file produces some output and that is displayed on HTML page  on a specific location using DOM (Document Object Model) property of HTML and using either of XMLHttp.ResponseText or response.Xml objects of ajax depending on your requirement. Response.Xml is required only when you want to retrieve multiple values from PHP file into multiple variables.

In this manner you can save a lot of bandwidth since after submitting a form on an HTML you may not always want to reload the whole page but instead update only few parts of the page.

Also you can have different clients talk to each other even without socket/listening server. This can be done by calling a javascript function each second that uses ajax technology and updates only certain parts per second. 

So, you can write your own Chat program using PHP, Javascript, Ajax and MySQL Database.

Queries, comments and suggestions  will be appreciated :D

 

 Top Comment : Anirban Bhattacharya   | 04 06 2009 14:32:56 +0000
Hi Gaurav, I appreciate your sincere effort, but it would be great if you can elaborate the article and describe some sections in more details. Otherwise some ambiguity is hampering the understanding.
 
4 comments on "Using PHP, Javascript, ajax and MySQL together to make interactive web pages"
  Commented by  Gaurav Sachdeva, Database Architect/Designer Amar Chitra Katha    | 04 07 2009 07:17:24 +0000
Hi Diptanjan,

Yes thats true, I have tried to mention many things in a single place. So if you need to understand something specifically please don't hesitate to ask.
  Commented by  Gaurav Sachdeva, Database Architect/Designer Amar Chitra Katha    | 04 07 2009 07:09:58 +0000
Hi Anirban,

What sections you think are ambiguous and need more elaboration ? Please specify if you need to know something in more detail.
  Commented by  Diptanjan Mukherjee, Team Leader -(Technical), Navayuga Infotech    | 04 07 2009 07:05:38 +0000
Rating : +2 
Hi Gaurav,

you have included too many things in a small place, as a result things are creating add on confusion. In a place you have mentioned " With the help of javascript you can make dynamic pages " - I think you have mentioned about DHTML here. Anyway I appreciate your effort of trying to share your knowledge but due to lack of elaboration it's hampering the understanding. Better if you can elaborate this article and introduce technologies one by one - HTMAL, Javascript, PHP, MYSQL and then Ajax.
  Commented by  Anirban Bhattacharya, Team Leader -(Technical), Navayuga Infotech    | 04 06 2009 14:32:56 +0000
Rating : +3 
Hi Gaurav,

I appreciate your sincere effort, but it would be great if you can elaborate the article and describe some sections in more details. Otherwise some ambiguity is hampering the understanding.
Add your comment on "Using PHP, Javascript, ajax and MySQL together to make interactive web pages"

Rate:
Submit
 
Viewers also viewed
 
0 referals 7 answers, 268 views
PHP vs ASP.NET
 
0 referals 10 arguments, 2968 views
Obviously there is never a winner in “language X is better/faster/more scalable than language...
 
3 referals 33 arguments, 54459 views
more...  
Recent Knowledge (36)
HRA stands for House Rent Allowance, it is an allowance provided by an employer to an employee....
 
235 referals 7 comments, 3225 views
We know that Ecommerce is the most happening trend of the day. After the emergence of ecommrce,...
109 referals 1 comments, 73 views
It is imperative for us to realize the POWER held in our words! When we state something, we are...
 
3095 referals 26 comments, 406 views
more...  
More From Author
Hi Diptanjan, Yes thats true, I have tried to mention many things in a single place. So if you need to understand something specifically please don't hesitate to ask.
Hi Anirban, What sections you think are ambiguous and need more elaboration ? Please specify if you need to know something in more detail.
PHP is serverside scripting language which can be used along with other web technologies such as javascript(which is client side) and ajax   to make interactive web pages. Websites also need databases to store information about users. In this...
more...