Subscribe: Free PHP MYSQL Tutorial - Free PHP MYSQL Tutorial
http://freephpmysqltutorial.weebly.com/2/feed
Preview: Free PHP MYSQL Tutorial - Free PHP MYSQL Tutorial

Free PHP MYSQL Tutorial - Free PHP MYSQL Tutorial



Free PHP MYSQL Tutorial



Published: Wed, 25 Apr 2018 12:41:19 -0700

 



The Primary Key

Thu, 09 Oct 2008 07:46:29 GMT

Spreadsheet programs (such as Microsoft Excel) have row numbers to identify what row a certain bit of data is in. Databases have a similar identifier, called the Primary Key. You can draw out your database with relative ease - or you can create a mock up of it in a spreadsheet. For example: This is a graphical representation of our code example on the previous page. Seems easy when you look at it, right? How do I remember what the primary key is when I make a new row of data? When you crea [...]



Common Field Data Types

Sun, 28 Sep 2008 12:50:04 GMT

CHAR() – Fixed length field between 0 and 255 characters that can store any type of data. The length of the field is set regardless of the size of the data placed into it. DATE – Date in YYYY-MM-DD format. INT – Whole numbers only. The number of digits can also be specified in parentheses, but is not necessary. TEXT – Variable length text-only field with a maximum length of 65535 characters. TIME – Time in hh:mm:ss format. VARCHAR() – Variable len [...]



Create Tables (and do just about everything else!) with MYSQL_QUERY

Fri, 19 Sep 2008 09:03:23 GMT

Now that we’ve selected the database we want to use, we need to put some tables in the database in order to store data. Before that happens, though, you need to think about what kind of data is going in to your tables.I’ll get to why in a moment. Here’s a simple example of table creation with the mysql_query command: You’ll need to define the t [...]



Putting The Data In The Base

Fri, 19 Sep 2008 08:54:12 GMT

OK! We’re connected to a MySQL database! Far out! Now what? We need to put data IN to the database and use it! So, here’s how we do it. First of all, you have to select the database with the mysql_select_db() command. Social Bookmarking [...]



Making The Connection To MySQL

Tue, 09 Sep 2008 22:07:07 GMT

First off, we need to be able to tell PHP to connect to a database before we can use it. The command is straight forward - mysql_connect().



More Functionality With A Database

Fri, 29 Aug 2008 15:50:40 GMT

Nowadays you hardly ever hear PHP mentioned without MySQL close behind. Why? Well, PHP and MySQL make a great pair for web application development efforts. MySQL is often used in conjunction with PHP for the same reasons PHP is so popular - it is free, widely available, and most web hosts have it installed. There are other database systems that PHP works with, but MySQL seems to be the most common. In this section, I’ll familiarize you with using MySQL to connect to a MySQL database a [...]



Section Two Overview

Tue, 26 Aug 2008 22:15:08 GMT

In this section, we covered some more advanced features of PHP. Not for the timid, but not impossible to grasp! IF - Do something if something is true. ELSE - Do something else if it isn’t ELSEIF - Add more choices to IF SWITCH - Use this if you have a lot of ElseIf’s ARRAY - One variable, many values ASSOCIATIVE ARRAY - One variable, even more values LOOPS - For, While, For Each - A way to repeat code FUNCTIONS - Turn a big code chunk into a small one SESSIONS - Carry u [...]



PROCESSING FORMS

Fri, 22 Aug 2008 23:48:07 GMT

What is one thing almost everyone wants to do with their website? Have a contact form. And, it isn’t as difficult as you’d think. We’re going to use the PHP mail() command to make one. Make an HTML form with Name, Email and Message fields. Take the code below and place it in a PHP file to use as your action.



Cookies

Wed, 20 Aug 2008 12:31:28 GMT

You are hopefully familiar with Cookies - you get them almost anytime you visit a website. Cookies allow you to store information about your visitor’s session on their computer. One of the most common uses of cookies is to store usernames. That way when a viewer returns to your site, they don’t have to log in each time they visit. You can create cookies in PHP with: There are 3 requirements when setting a cookie: Name [...]



PHP SESSIONS

Fri, 15 Aug 2008 13:28:14 GMT

When your websites start to become more advanced and you find that you have a need for specific user data to be available throughout different pages on your website (think shopping cart!), it’s time for Sessions! Starting a session is a snap. The webserver will attach a really really long random “session ID” to indicate a unique session. It looks something like: a8486dd2a3eacc136bd44ca653d8c5a2 A session isn’t worth a hill of beans [...]