Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 21st, 2006, 08:15 AM
Authorized User
 
Join Date: Nov 2006
Location: Mumbai, Maharashtra, India.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vinu123 Send a message via Yahoo to vinu123
Default Can't connect to my sql

Guys, i created databse using phpmyadmin, created pages in Dreamweaver,
obviously i can understand ther is no physical relation between my database & PHP pages, how can i connect to my database ?
I have installed WAMP Server, i am using phpmyadmin through it.

 When i connect to database ( Via Dreamweaver 8) what details do i need to put like :

    Connection name :
    My sql server :
    Username :
    Password :
    Database :


I am using WROX book called " Dreamweaver MX - PHP web developement "

  PLease try to resolve my Query

 is it anything to do with Privillages?

Regards,
Vinod soable;
Email : vinodsobale@gmail.com
http://top10web.co.nr
__________________
Regards,
Vinod soable;
Email : vinodsobale@gmail.com
http://top10web.co.nr
Reply With Quote
  #2 (permalink)  
Old January 29th, 2007, 10:19 AM
Authorized User
 
Join Date: Jan 2007
Location: Lisbon, , Portugal.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The data you will need to supply will vary according to your hosting solution. These data are normaly supplied by the hosting company when you get your hosting for the first time, as long with accesses to you phpMyAdmin and ftp acesses.
phpMyAdmin will give you the answer to most of your questions in the database part, however it won't reveal your account information.

If you are in localhost, then you shoul have all the data.
    Connection name : build it and name it inside PHP
    Mysql server : localhost (or content of config file of apache)
    Username : your definition when you have created the DB (can be empty)
    Password : your definition
    Database : you've created it in phpMyAdmin


include_once "/connections/conn.php";
$db = mysql_connect ($hostname, $admin, $password) or die("Impossible to access database!");
mysql_select_db ($database, $db);

would be the code to connect.

Contact me is you have any more questions

Visit my page: http://www.webrickco.com
Reply With Quote
  #3 (permalink)  
Old January 30th, 2007, 12:17 AM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Connection name : build it
My sql server :localhost (in case of using local) or ur server(domain) name
Username :the one u have defined
Password :the one u have defined
Database :ur database name u created

thanx
Raaj

Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connect sql-server with c# technorakesh C# 1 April 22nd, 2006 08:09 AM
Cannot Connect to SQL Server JoshCBR28 BOOK: Beginning ASP 3.0 2 October 25th, 2005 10:27 AM
connect to sql db jopay Visual C++ 0 January 12th, 2005 05:17 PM
the connect of Wap and Sql bicyle BOOK: Beginning ASP 3.0 0 February 21st, 2004 07:09 AM
Connect to sql database kale_tushar Pro VB 6 8 September 8th, 2003 03:27 AM



All times are GMT -4. The time now is 05:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.