What is PHP?
What is SQL?
Why use MySQL?
The most broadly utilized kind of SQL information base on the World Wide Web today is MySQL. As the most well known Open Source SQL information base administration framework, MySQL is created, disseminated, and upheld by MySQL AB. Since MySQL is lightweight, open source-based and free, it is an establishment for some novice, non-expert, or open source ventures like Joomla, Wordpress, 4images and PHPBB3. Shockingly, MySQL doesn't give the more elevated level of security regular of costly undertaking class information base arrangements, for example, Oracle, MsSQL, Sybase, however it gives a safe, quick and dependable enough data set help which is actualized in numerous expert web conditions.
MySQL information bases are favored over the restrictive information base frameworks because of their unwavering quality and speed of execution. They are most ordinarily utilized for both customary and inserted Web applications running on UNIX, Windows and Mac OS. MySQL is the ideal information base programming for both moderately stacked sites and high-traffic web-based interfaces. Contingent upon the reason and size of your site - you may require somewhere in the range of 1 and 9999 MySQL information bases.
How to install MySQL?
MySQL deals with a wide range of working frameworks, including Windows, Linux, BSD, Mac OSX and then some. Something which make MySQL truly well known is the basic mix with PHP (one of the most utilized web improvement dialects).
The start of PHP and PHP 3
echo 'Hello World!';
?>
One of the most notable advantages of the PHP language is its ability to easily interact with databases. Below you can see an example PHP manipulating with mySQL databases.
<?php
// Connecting, selecting database
$link = mysql_connect('dbhost', 'dbuser', 'dbpassword')
or die('Could not connect: ' . mysql_error());
mysql_select_db('my_database');
// Performing SQL query
$query = 'SELECT name, qty, price FROM products';
$result = mysql_query($query)
or die('Query failed: ' . mysql_error());
// Printing result
while ($row = mysql_fetch_assoc($result)) {
echo "Product:".$row['name']
.", Quantity:".$row['qty']
.", Price:".$row['price']."<br>";
}
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
Create a PHP program to display the bio data of a person by reading the person details using HTML
When constructing a mind boggling page, sooner or later you will be confronted with the need to consolidate PHP and HTML to accomplish your required outcomes. From the outset point, this can appear to be confounded, since PHP and HTML are two separate dialects, yet this isn't the situation. PHP is intended to associate with HTML and PHP contents can be remembered for a HTML page without an issue.
In a HTML page, PHP code is encased inside exceptional PHP labels. At the point when a guest opens the page, the worker measures the PHP code and afterward sends the yield (not simply the PHP code) to the guest's program. In reality it is very easy to incorporate HTML and PHP. A PHP content can be treated as a HTML page, with pieces of PHP embedded to a great extent. Anything in a PHP content that isn't contained inside <?php ?> labels is overlooked by the PHP compiler and passed straightforwardly to the internet browser. In the event that you take a gander at the model underneath you can perceive what a full PHP content may resemble:
<head></head>
<body class="page_bg">
Hello, today is <?php echo date('l, F jS, Y'); ?>.
</body>
</html>
Perceive how simple that is? Incorporating PHP and HTML is actually quite basic. Simply recollect that at its center, a PHP content is only a HTML page with some PHP sprinkled through it. In the event that you need, you can make a PHP content that just has HTML in it and no <?php ?> labels, and it will work fine and dandy.
2 Comments
Nice work buddy keep it up
ReplyDeleteGood Job Pal!
ReplyDeletePost a Comment