Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 23-07-2005, 11:56 AM   #1 (permalink)
Broken In
 
Join Date: Feb 2004
Posts: 125
Default connection of PHP & MySQL


how do i connect PHP files with MYSQL database?
__________________
Think about it!
Trinity is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-07-2005, 12:09 PM   #2 (permalink)
Broken In
 
Join Date: Feb 2004
Posts: 125
Default urgent

this query is damn urgent it wud be kind of u to find an answer to this & post a reply immediately to it.[/b]
__________________
Think about it!
Trinity is offline  
Old 23-07-2005, 01:13 PM   #3 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

OK....if u are gonna install something like PHPBB, Wordpress, PHP-Nuke and want to give the MYSQL DB information...then go as follows....

1. Create a new Database using PhpMyAdmin
2. Note the name of the Database, Your_Database_Username, Your_Databse_Password

3. Open the install.php file, in Database Name fill your databse name, in the username and password fields fill ur username and password and click install....the php will automatically connect to the mysql server's default port.....and will install the application....

U can make new databses, assign usernames and passwords through your servers MySql database manager....Generally if u have Cpanel installed...U can acces it through.....http://www.your_site_name.com:2082/f...sql/index.html
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 23-07-2005, 01:39 PM   #4 (permalink)
Broken In
 
Join Date: Feb 2004
Posts: 125
Default PHPMyAdmin & CPanel?

what is
1) PHPMyAdmin?
2) CPanel?
__________________
Think about it!
Trinity is offline  
Old 23-07-2005, 02:20 PM   #5 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

lol.....I think u r trying to learn all things soo fast....
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
Old 23-07-2005, 02:39 PM   #6 (permalink)
Broken In
 
Join Date: Feb 2004
Posts: 125
Default

lol....not soooo fast, but they r inter-linked & an essential ensemble for a good application. U know that!

We'll just to give u a bkgrd of wat i m upto - i m makin an application usin MySQL, PHP & Apache.

I m done with the installation of all the 3 but m facing difficulty in connecting MYSQL with php....where wud i get a ready-made , easy to use code from for this connection?

My Db is ready & so r the php forms

Have an answer?
__________________
Think about it!
Trinity is offline  
Old 23-07-2005, 02:44 PM   #7 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

YOu have already got an answer on what is PHPMyAdmin at some other thread.

As for CPanel, you can think of it as a front end to control various features and facilities of your hosting account. You need to have a domain name and a paid hosting account to use it. For more information and demo, you can go to http://www.cpanel.net
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 23-07-2005, 10:40 PM   #8 (permalink)
Wise Old Owl
 
alib_i's Avatar
 
Join Date: Jun 2004
Location: omnipresent
Posts: 1,191
Default

typical code for connecting mysql looks like this ::
Code:
mysql_connect('localhost','<username>','<passw>');
@mysql_select_db('<databasename>') or die( "Unable to select database");
$result=mysql_query("select <column> from <table>");
$row=mysql_fetch_array($result);
$contents=$row['<column>'];
this will select the first row of your selected column in the table. if you want to select the next row, then call mysql_fetch_array again. typical usage is like this:
Code:
while ($row = mysql_fetch_array($result)) {
   $contents=$row['<column>'];
   echo $contents;
}
you asked for connection of php and mysql, so i gave you corresponding code. for making a database or table, you better learn how to use phpmysql or MySQL-Front


-----
alibi
__________________
What I've felt, What I've known; Never shined through in what I've shown
Never free, Never me; So I dub thee unforgiven
-Metallica
alib_i is offline  
Old 23-07-2005, 11:15 PM   #9 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default

Yes alib_i has given u the code for making a connection to a MySQL database via PHP. I was just too lazy to type it! Actually its a copy paste code so i dont remember it anyway!

Anyway, u seem to be confused about this whole MySQL thing. MySQL is a database server. U can connect to it through diff methods. Basically all applications connect to the MySQL server through a TCP port (3360 or 3366 or something like this, told u im lazy!). The applications send requests to the MySQL server through this port. Anyway, this should give u a basic idea.
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 24-07-2005, 11:47 AM   #10 (permalink)
In The Zone
 
Join Date: Dec 2004
Location: Vice City
Posts: 461
Default

yeah rite
__________________
--------------
Lovedeep Wadhwa
cheetah is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by abhidev
- by topgear
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2