Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2006, 08:15 AM
Authorized User
 
Join Date: Nov 2006
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 : [email protected]
http://top10web.co.nr
__________________
Regards,
Vinod soable;
Email : [email protected]
http://top10web.co.nr
 
Old January 29th, 2007, 10:19 AM
Authorized User
 
Join Date: Jan 2007
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
 
Old January 30th, 2007, 12:17 AM
Authorized User
 
Join Date: Dec 2006
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






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.