Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP & MYSQL Introduction
Old 12-31-2005, 05:34 AM PHP & MYSQL Introduction
dotcomguy's Avatar
Skilled Talker

Posts: 89
Location: Manchester, UK
Trades: 0
This is a tutorial that I wrote a short while ago for my site Webmaster tools, Hope someone can find some use for this tutorial... enjoy

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 http://www.chauy.com/2005/11/introdu...age-of-choice/.

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.

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
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: http://www.wampserver.com/en/download.php

Here are the installation instructions from wampservers site: http://www.wampserver.com/

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.

For part 2 of this tutorial visit: http://www.chauy.com/2005/11/php-mysql-part-2/

thanks!
__________________

Please login or register to view this content. Registration is FREE
from just $1.85 per post.
dotcomguy is offline
Reply With Quote
View Public Profile Visit dotcomguy's homepage!
 
 
Register now for full access!
Reply     « Reply to PHP & MYSQL Introduction
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57537 seconds with 12 queries