How to connect from a PHP file to a MySQL database

I Love Programming

One of the best features of PHP is how easily it interacts with MySQL. This allows you to store information in a database for your website to access and then create dynamic content. In order to do this you need to be able to read and write to the MySQL database from your PHP based website.

You can connect to your database from a PHP file with the following code:

mysql_connect("", "username", "password") or die(mysql_error()) ;
mysql_select_db("Database_Name") or die(mysql_error()) ;

Obviously you need to change the highlighted items to represent the actual values for your database.

Once you are connected to your database you can read data or write to your database.


View original post

The Difference Between a Programmer, a Hacker, and a Developer

I Love Programming

There is often spirited discussion and debate about the differences between Programmers, Hackers, and Developers. Most descriptions I’ve seen are flawed in at least one serious way, so I provide below my preferred—and I hope more accurate and elegant—definitions:

  1. Programmer is someone who can solve problems by by manipulating computer code. They can have a wide range of skill levels—from just being “ok” with basic scripting to being an absolute sorcerer with any language.
  2. Hacker is someone who makes things. In this context, it’s someone who makes things by programming computers. This is the original, and purest definition of the term, i.e., that you have an idea and you “hack” something together to make it work. It also applies to people who modify things to significantly change their functionality, but less so.
  3. Developer is a formally trained programmer. They don’t just solve problems or create things, but…

View original post 427 more words

Five Interesting Facts About the Inventor of the C Programming Language

I Love Programming

Dennis Ritchie’s invention, the C programming language paved the way for many of the popular modern programming languages in use today. Languages such as JavaScript have borrowed concepts either directly or indirectly from C. Dennis Ritchie is credited with helping shape the digital era for his invention of the C programming language. Here are some interesting facts about this great inventor’s life.

The Career and Education of Dennis Ritchie

Dennis Ritchie attended Harvard and graduated with degrees in Physics and Applied Mathematics. He began working at Bell Labs in 1968 and later went on to receive his PhD under the supervision of Patrick C. Fischer. His doctoral dissertation was titled “Program Structure and Computational Complexity.” Ritchie was best known for his work as a key figure in the development of the UNIX operating system. He also co-authored the quintessential book on C, titled “The C Programming Language.”

Awards Given to…

View original post 390 more words

#3 Web Development Basics – MySQL Basics

This video gives a basic idea on the data representation in a database application such as MySQL. We will also explore some SQL commands and start interacting with the MySQL console. We will discuss about creating databases, tables and also to list and view info about tables.