English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How to get example codes for bigginers in PHP. I am very much interested do learn PHP 5.0 and Mysql 5.0 in linux environment.

2007-03-20 00:14:01 · 6 answers · asked by dilip kumar 1 in Computers & Internet Programming & Design

6 answers




$db = mysql_connect("localhost", "root");



mysql_select_db("mydb",$db);

You probably DONT want to use root to connect but change that to your username for the database you setup. You probably will also need the password for that user.

That connects you.
If you want a good starting place for tutorials
try.
http://www.webmonkey.com/webmonkey/99/21/index2a.html
http://www.goodphptutorials.com/category/basic-and-beginner/1/10/popular

2007-03-20 01:32:36 · answer #1 · answered by Tracy L 7 · 0 0

The best place to learn php is from the guys that made the darn thing.

http://www.php.net

look up mysql in the function list

RJ

2007-03-20 11:29:13 · answer #2 · answered by Anonymous · 0 0

The syntax of connection from php to MySql database is:
mysql_connect("host name","login","password");
here,
(1) mysql_connect is the name of function
(2)hostname will be localhost if your database and webserver is same else check your host settings for external database server.
(3)login and password is root and blank in default in easyphp, else provide your custom created

eg:
$db = mysql_connect("localhost", "root",""); //connect to database and store the connection point to $db
mysql_select_db("mydb",$db); //select the database name mydb from connection $db

Search in Yahoo/Google for "php beginner tutorials"

2007-03-21 06:37:20 · answer #3 · answered by Shishir Gupta 1 · 0 0

in case you desire to alter right into a utility engineer, and not an internet site programmer, i strongly recommend perl. it rather is a well-known language, and not an basic one. yet Hypertext Preprocessor is nearly limited to internet progression, whilst Perl may be used for each thing.

2016-10-19 03:49:36 · answer #4 · answered by ? 4 · 0 0

The best way is to include a variation of the DB object from PEAR:
require_once "DB.php";
$db = DB::connect("mysql://user:password@host/database");

[etc]...

2007-03-20 01:02:11 · answer #5 · answered by poorcocoboiboi 6 · 0 0

www.phpfreaks.com , www.mysql.org , Good luck :)

2007-03-20 00:24:10 · answer #6 · answered by Brandon 1 · 0 0

fedest.com, questions and answers