In this application you can see that names of the employee are just displayed. This a dynamic page where data is coming from database. How to do this?
Firstly you should have to write a SELECT SQL command for selecting database. After that you have to declare a variable, and store this mysql_fetch_array() in that variable. In fact you have to store the SQL command in a variable. Now, how to declare a variable in PHP? We declare variable C programming language as “int a;” here we will not declare the like this. We will just use the $ sign the name of the variable that’s it. Now, how to fetch the values from the database? For this you have to use while loop. Write a statement according to your choice, for this you have to create your own logic. Hope this much knowledge is enough. If face any problem please feel free to ask.
No comments:
Post a Comment