![]() |
|
|||||||
| Notices |
| Programming Forum Web and Software Programming Forum - Java, PHP, SQL etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
explain exactly what it is you are trying to connect.. ie: MovableType, WordPress, Joomla!, etc. And are you trying to do this on a local machine or a live database on the web?
__________________
Tommy Logic ™ Web Design :: Valid XHTML & CSS :: SEO :: CMS :: eCommerce Web Design Tutorials :: Computer Tutorials |
|
||||
|
The first one is the more usual way of doing it, but the second will work if connect_db() is called. Since $conn isn't global, you need to type something like
PHP Code:
$foo will be your link after that. It's not a bad way of doing it if you plan on re-using the code lots.
__________________
Subtlety is my middle name... and first and last in case you didn't get the point. |
|
||||
|
I see from your other posts that you are trying to connect Dreamweaver to a local database on your machine... you might take a look into this...
Video Tutorial | Testing Server & Dreamweaver
__________________
Tommy Logic ™ Web Design :: Valid XHTML & CSS :: SEO :: CMS :: eCommerce Web Design Tutorials :: Computer Tutorials |
|
||||
|
hope that solved your problem
__________________
Tommy Logic ™ Web Design :: Valid XHTML & CSS :: SEO :: CMS :: eCommerce Web Design Tutorials :: Computer Tutorials |
|
||||
|
heres my two cents:
i quite like this kind of mysql connection script, i spose u could use it for postgresql without too much difficulty. // add your information here. define(HOST, 'localhost'); define(USER, 'yourusername'); define(PASS, 'yourpassword'); define(BASE, 'yourdatabase'); /// --- you would not really need to edit below here --- /// // add some connection error handling so that we get a nice error. // check the connection string. if(!@mysql_connect(HOST, USER, PASS)) { echo "Database could not be connected to. Please check your settings"; } // then we check the selection string. if(!@mysql_select_db(BASE)) { echo "The database selection could not be completed. Please check your settings."; } ?> im probably a little late but anyway :)
__________________
its just me :) |
![]() |
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WordPress Database has Come Back! | Graphic Design Blog | Graphic Design Blog | 0 | 05-05-2008 03:00 AM |
| ISBN Database Solution | swtectonics | Graphic Design and Web Design Help | 3 | 05-03-2008 02:21 PM |
| database question | jwade_m | Programming Forum | 10 | 17-01-2008 12:13 PM |
| Database | Toon | Graphic Design Forum Announcements | 12 | 07-01-2008 03:43 PM |
| Computerlove™ - Connecting Creative Talents | Graphic Design Links | Graphic Design Links | 0 | 30-10-2007 01:20 AM |
| All times are GMT. The time now is 06:37 AM. |
