hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Programming Tutorials : PHP/MYSQL Tutorial - An Introduction - Part 1
Reply

Programming Tutorials How-Tos related to programming, databases, and the like.
Forum Jump

PHP/MYSQL Tutorial - An Introduction - Part 1

Reply Post New Thread In Programming Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-23-2005, 09:00 PM
dotcomguy01 dotcomguy01 is offline
WHT Addict
 
Join Date: Sep 2004
Location: England UK
Posts: 121

PHP/MYSQL Tutorial - An Introduction - Part 1


PHP is the programming language of the web it’s a fact the php is used on more webservers servers than any other web language. At the time of writing php is installed on just under than 24,000,000 Domains. For a more detailed introduction to php try the link.

MYSQL is a commercial grade database application that is made available free under the Open Source to anyone. It’s had over 6 million installs ranging from large muli-national corporations to specialized embedded applications the website also claims mysql is installed on every continent in the world… Including antartica. At least they can blame the weather when the computer freezes… hehe! Currently MYSQL runs on more than 20 platforms including Linux, Windows, OS/X, HP-UX, AIX and Netware. Which is a perfect solution for portability requirements.

PHP - MYSQL it does have uses

The benefits to creating a site that implements a php and mysql setup are really down the site and how it wants to run and taking into account how specific data is stored and displayed, php and mysql can be used in many senarios including:

# Storing and Displaying Lots of Categorised data - For example the article you are reading now, has come from our mysql database. Sites with lots of information that needs to be categorised, stored and easily displayed would benefit from a mysql backend. Lets again take this site for example, if we created the site the old fashioned way then we would have to create a single HTML page for every article. Now lets say we we wanted to change a link in the menu right of this page then we would need to go through each and every single HTML page and manually change every element to it. Not fun I’m sure you’d agree. but with php and mysql all we now need to do is change one single php page and the whole site updates our link.. Saving you time and your sanity.

# Saving customer data into php- Many websites as an example use the duo to save customer data, Including Name, telephone, address etc.. well you get the picture. MYSQL can also track customers locations on the site and save that information into the database. PHP can also store customer purchasing and previous orders into the database which allows you to build up a perfect system for tracking customer trends and customers shopping habits based on country. All you would need to do is create a php that told mysql to grab the particular information only.

# Forums use mysql - Messaging boards or forums as they are sometimes known as can use php and mysql to create some pretty great communities allowing us to communicate with people with the same interests just a quick note if your looking for a really good Webmaster Forum please check out webmaster-talk. If a forum is what you were looking for then here is a quick list of the most popular and recommended.

1. PHPBB - PHP bulletin board is a great choice and very popular.
2. vBulletin - Instant Community Another good forum choice been around a long time and WHT uses them!

Installation
Please take note that your web host will have php and mysql pre installed on the server but and easy way to check is copy the code just below into notepad then save it as ‘info.php’. Upload it to your webspace via FTP and then goto your browser and type in www.yourdomain.com/info.php or where ever you dropped the file.


PHP Code:
< ?php
phpinfo
();
?> 
it should show you a lot of information such as the version of php your running and additonal, but useful information about the configuration of your php. A list of installed manuals is also included.

To install PHP & MYSQL on windows you can do it manually or you can use a program called WAMPserver which will automatically install the setup for you, just to let you know the W.A.M.P stands for windows, Apache, Mysql and PHP.

WAMPserver installation on windows

WAMP5 installs the following software on your machine Apache 1.3.31 ,PHP5, MySQL database ,PHPmyadmin and SQLitemanager on your computer. Essentially your going to turn your windows machine into a webserver beacause we are installing apache. PHP does need apache webserver to run in this setup usually.

You can download WAMPserver here

Here are the installation instructions from wamservers site:

When you install WAMP5, all the files are copied in the directory you choose. Conf files are then modified to point to that directory. It also installs a “www” directory which will be your Document Root.

At the end of the installation, WAMP5 will automatically install Apache and MySQL as services :

- service’ wampapache’ : apache service

- service ‘wampmysql’ : mysql service

WAMP5’s installation is compact. This means that all files are copied to WAMP5’s directory. Only the MySQL conf file (usually my.ini) is copied to the Windows directory but as “mywamp.ini” to avoid conflicts with other installs. You just have to click on the icon tray to access WAMP5’s menu, The icon tray reflects the status of your server, When you’ll uninstall WAMP5, all the services and files will be automatically deleted.

In part two will be getting down to the nitty gritty by setting up the mysql database and connecting to it through php.

The next installment of this tutorial can be found below:

PHP/MYSQL Tutorial Part 2: Setting up MYSQL Database

Reply With Quote


Sponsored Links
  #2  
Old 11-28-2005, 08:05 AM
zergus85 zergus85 is offline
Newbie
 
Join Date: Nov 2005
Posts: 5
Thanks for the info... it may be helpful for others...

Reply With Quote
  #3  
Old 01-13-2006, 09:29 PM
Minodragon Minodragon is offline
New Member
 
Join Date: Jan 2006
Posts: 4
Hmm...some things there even I didn't know! Not a bad tutorial.

Reply With Quote
Sponsored Links
  #4  
Old 01-13-2006, 10:21 PM
dotcomguy01 dotcomguy01 is offline
WHT Addict
 
Join Date: Sep 2004
Location: England UK
Posts: 121
I'm happy you learned something from my tutorial, also thanks for the feedback.

Reply With Quote
  #5  
Old 03-09-2006, 08:43 PM
JayUK JayUK is offline
Junior Guru Wannabe
 
Join Date: Feb 2006
Posts: 62
Thanks for that mate. You know, PHP and MYSQL really isn't as scary as I first thought, I knew a bit but not enough. I think I will study it more.

Reply With Quote
  #6  
Old 04-10-2006, 09:22 PM
sdnet sdnet is offline
WHT Addict
 
Join Date: Jul 2001
Location: Arizona
Posts: 144
PHP is a wonderful building block to other languages, especially Unix based. If you have a good understanding of PHP, picking up other languages like PERL or C will be relatively straightforward. PHP needs to be required learning in elementary programming classes in high schools.

Reply With Quote
  #7  
Old 08-03-2010, 04:11 PM
Aran11 Aran11 is offline
Disabled
 
Join Date: Aug 2010
Location: Somerset, UK
Posts: 53
Would also recommend Xampp as an alternative to WAMP - Again for Windows

Reply With Quote
  #8  
Old 11-05-2010, 05:32 AM
VS-David VS-David is offline
Temporarily Suspended
 
Join Date: Oct 2010
Location: Orlando, Florida
Posts: 44
Thanks for the tutorial...helped a newbie like me =D

Reply With Quote
  #9  
Old 11-22-2010, 06:18 AM
jenok jenok is offline
Premium Member
 
Join Date: Aug 2003
Location: Taiwan
Posts: 750
Nice tutorial !!

Quote:
Originally Posted by Aran11 View Post
Would also recommend Xampp as an alternative to WAMP - Again for Windows
And second to xampp

Reply With Quote
  #10  
Old 12-03-2010, 04:58 PM
Johnny D Johnny D is offline
Web Hosting Guru
 
Join Date: Dec 2005
Location: Swansea, United Kingdom
Posts: 346
Nice tutorial, easy to follow.

Reply With Quote
  #11  
Old 12-20-2010, 09:25 AM
zyxw zyxw is offline
New Member
 
Join Date: Dec 2010
Posts: 0
I have done sql certification, now need a knowledge about PHP, i thank you for the informative stuff.

Reply With Quote
  #12  
Old 01-14-2011, 12:34 AM
webexperts webexperts is offline
Newbie
 
Join Date: Jan 2011
Posts: 18
This is a nice tutorial for start up guys...
I prefer using a framework like Zend for developing web sites,
as MVC is easy to maintain , also has lots of inbuilt classes.

Reply With Quote
  #13  
Old 01-14-2011, 12:37 AM
Nasy Nasy is offline
New Member
 
Join Date: Jun 2009
Posts: 1
nice tutorial

Reply With Quote
  #14  
Old 01-24-2011, 06:48 AM
joshua064 joshua064 is offline
Newbie
 
Join Date: Jan 2011
Posts: 7
Thank you.. It become easy for me now to try php/mysql

Reply With Quote
  #15  
Old 02-13-2011, 06:57 AM
saiPA saiPA is offline
New Member
 
Join Date: Feb 2011
Posts: 0
this was really helpful thankyou

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Sales and Promos Roundup – May 25, 2012 Web Hosting News 2012-05-25 16:52:12
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Hurricane Electric Offers Online Courses for Developers and Designers Web Hosting News 2011-11-14 21:51:44
Web Hosting Tutorial Provider DemoWolf Acquires Competitor DemoDemo Web Hosting News 2011-09-21 15:36:44
Web Hosting Sales and Promos Roundup - July 15, 2011 Web Hosting News 2011-07-15 20:03:26


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?