WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search


Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - השוואת מחירים בסופר
ZeroLag.com
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this Article to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES SUBMIT AN ARTICLE PRINT
Title : Start Using MySQL
Categories : MySQL, Databases, To MySQL, Beginner Guides
phpfreaks.com
phpfreaks.com
Date : 2002-08-28
Grade : 1 of 5 (graded 1 times)
Viewed : 22122
Search : More Articles by phpfreaks.com
Action : Grade This Article
Tools : My Favotite Articles


Submit your own code examples 
 


SQL stands for Structured Query Language.

MySQL runs on a server deamon where users on the same or even remote computers can connect.
Once connected you can select database if you have privileges to do so.

In this tutorial you will learn:

1. How to connect to MySQL.
2. Create a Table
3. Insert data in to you database.
4. Display database data in you browser.
5. Change data.

The Code:

Lets start off by connecting to MySQL:


<?php
$location
= "localhost";
$username = "username";
$password = "password";
$database = "database";

$conn = mysql_connect("$location","$username","$password");
if (!
$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
?>


Read More...









Beginners guide to PHP and MySQL
Categories : PHP, Beginner Guides, Databases, MySQL, Installation
Counting - Creating a GIF based counter using PHP and MySQL
Categories : Beginner Guides, PHP, To PHP, To MySQL, MySQL
Counting - Creating a more sophisticated GIF based counter using PHP and MySQL
Categories : Beginner Guides, MySQL, PHP, To PHP, To MySQL
Beginners guide to PHP and MySQL - Creating a simple guest book
Categories : Beginner Guides, To PHP, To MySQL, PHP, MySQL
How To add paging (Pagination) with PHP and MySQL
Categories : PHP, Beginner Guides, Databases, MySQL, HTML and PHP
Counting - Creating a simple counter
Categories : PHP, MySQL, Beginner Guides, To PHP, To MySQL
How TO Install PHP, Apache and MySQL on Linux or Unix
Categories : PHP, MySQL, Apache, Installation, Beginner Guides
Descriptions of Common Data Types
Categories : MySQL, Databases, PHP, PHP options/info, General
Unicode and Other Funny Characters
Categories : Databases, MySQL, Unicode
Case Study: Handling MySQL Growth With a PHP Class
Categories : Databases, MySQL, PHP
MySQL Access Control System - Grant Tables
Categories : Databases, MySQL, Security
Creating an IE-Only Database Driven Menu System With PHP, MySQL and DHTML
Categories : PHP, MySQL, Databases, DHTML
Practical Date and Time examples with PHP and MySQL
Categories : Databases, MySQL, PHP, Date/time
PHP, MySQL and Authentication 101
Categories : PHP, Databases, MySQL, Authentication
Building A Persistent Shopping Cart With PHP and MySQL
Categories : PHP, MySQL, Databases, Ecommerce