- Many people will walk in and out of your life but only true friends will leave footprints in your heart.
- To handle yourself, use your head; to handle others use your heart.
- Love is like playing the piano. First you must learn to play by the rules….! Then you must forget the rules and play from your heart!!!!
- Anger is only one letter short of danger.
If someone betrays you once, it is his fault; if he betrays you twice it is your fault…
- The best and most beautiful things in the world cannot be seen or even touched. they must be felt with the heart
- Great minds discuss events; small minds discuss people. To see the world in a grain of sand, And a heaven in a wild flower; Hold infinity in the palm of your hand, And eternity in an hour
- Yesterday is past, it is history.Tomorrow is future, it is a mystery today is present, it is a gift!
Most people try to pose good to google.But google may not take care of that at all.So here I think why we are so kind to google.com.
I am running a website for a company,that is a great company with a useful website which produce “caster and wheel” in China,but the website of that company never enter into Top 10 when you google “caster and wheel ” in Chinese.
If you check “Caster and wheel” in Chinese,google will give you a list websites of Caster and wheel manufacturers.And I sample click some in top 3,just find the websites really do not have much useful content on “Caster and wheel”.
So sometimes google.com just become a place for spammers.You are not able to get the best content for your queries.
And for some websites,let’s just say WSAs,you may found their information is useful,but they may just copy the content from other websites WSBs.So they take the good place at google.
But if possible,I would like to go with WSBs.And if WSBs stop creating new content,WSAs can not live anymore.So google is not that good.For good companies and WSBs,they are not care about the ranking at google.For bad companies and WSAs their content is not worth to read.
So we just need to focus on the content,focus on own mind & ideas,or we just need to learn some asp & php language,and just type out what in our mind and just share our mind with other people,or just use our website to help other people.
Written By: Avery Lin
After connect php website and database,we will try to get the content from the database,we can create a page which is called content.php.
And we just need to put this code in the <body> </body> part.
<?php
$query_subjects = “SELECT * FROM subjects”;
$query = mysql_query($query_subjects);
if(!$query) {
die(”Database selection failed: ” . mysql_error() );
}
//so we just have get the content from the database subjects table,now we need to display the content on the website.
while($ subject_row = mysql_fetch_array($query)) {
echo $row[menu_name] ;
}
?>
It will get all the meun_name from the database and it will display on your website.
We just need to create a file config.php
and have the code
<?php
//Database Constants
define(”DB_SERVER”, “localhost”);
define(”DB_USER”, “english_wefri”);
define(”DB_PASS”, “winnerlabel”);
define(”DB_NAME”, “english_wefriend”);
?>
then create a file which is called connection.php
and put the code in the file.
<?php
require(”constants.php”);
// 1.Create a database connection
$connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS);
if(!$connection){
die(”Database connection failed:” . mysql_error());
}
// 2.Select a database
$db_select = mysql_select_db(DB_NAME,$connection);
if(!$db_select){
die(”Database selection failed: ” . mysql_error());
}
?>
Then we just connect the our site to the database.
And we can put different kinds of code after that in the <head> & </head> as well as <body> </body> party.
After finish that we shall close the database,we just need to create another file which is called footer.php
we just need to put the code
</div>
<div id=”footer”>Copyright 2007,Widget Corp</div>
</body>
</html>
<?php
if(isset($connection)){
mysql_close($connection);
}
?>
within the footer.php
so this three files help us with create a connection the our database and disconnect ourdatabase.
First,I’d like to post a small php script,
<?php
phpinfo();
?>
This script can help you know the php installed in your servers.You can put this script between the <body> </body>,and save your file in .php,then upload that file to your hosting.
visit that file,then you can get the information of php script of your hosting.