GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Feb-2007, 04:54
markyp markyp is offline
New Member
 
Join Date: Nov 2006
Posts: 26
markyp is on a distinguished road

Connecting the DB to PHP (wamp)


Hi,

I have created my database in phpmy admin using the wamp server, Then I have creted code in text pad and put this on the local host.

I need to know how two combine the two?

thanks
  #2  
Old 07-Mar-2007, 01:51
davethedork davethedork is offline
New Member
 
Join Date: Mar 2007
Posts: 11
davethedork is on a distinguished road

Re: Connecting the DB to PHP (wamp)


Please try to explain yourself in a more detailed manner and I will be happy to help you. I just don't understand the question...
  #3  
Old 05-Apr-2007, 15:11
lwbbs lwbbs is offline
New Member
 
Join Date: Apr 2007
Location: www.easywebx.com
Posts: 27
lwbbs has a little shameless behaviour in the past

Re: Connecting the DB to PHP (wamp)


Connect to your database in your code.

Quote:
Originally Posted by markyp
Hi,

I have created my database in phpmy admin using the wamp server, Then I have creted code in text pad and put this on the local host.

I need to know how two combine the two?

thanks
  #4  
Old 15-Apr-2007, 22:10
realmetrics.com realmetrics.com is offline
New Member
 
Join Date: Apr 2007
Posts: 8
realmetrics.com is on a distinguished road

Re: Connecting the DB to PHP (wamp)


Here I have provided you the code for database connectivity

Code:
<?php $dbhost = 'localhost'; $dbuser = 'myUsername'; $dbpass = 'myPassword'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or echo (mysql_error()); $dbname = mysql_select_db(“dbname”,$conn) or echo(mysql_error()); mysql_close(); ?>

Kindly re-check your username and password of MYSQL before connecting.
For adding, updating, fetching and deleting use your own sql in this code.

______________________________________________

http://www.realmetrics.com - Metrics you can count on
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 4.4.0 -- not properly connecting to db tgo MySQL / PHP Forum 4 09-Aug-2005 22:24
Help ! I need help starting up on Php ! onauc MySQL / PHP Forum 11 04-Jan-2005 23:57
uisng php to display php dopee MySQL / PHP Forum 6 14-May-2004 18:40
php software dopee MySQL / PHP Forum 0 04-May-2004 11:26
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 02:57.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.