Graphic Design Forum and Web Design Forum  

Go Back   Graphic Design Forum and Web Design Forum »Web Design Forum »Programming Forum

Notices

Programming Forum Web and Software Programming Forum - Java, PHP, SQL etc.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21-01-2008, 02:15 PM
jwade_m's Avatar
Graphic/Web Designer
 
Join Date: Aug 2007
Location: Indiana, United States
Posts: 196
Default connection.php

Is this written right to connect to a database? Or does something need added?

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true);
$server = "";
$username = "";
$password = "";
$link =mysql_connect($server,$username,$password) or die ("Could not connect db ") ;
if (!@mysql_select_db("", $link)) { // leave the database name as anydb for now
echo "

There has been an error. This is the error message:

";
echo "

" . mysql_error() . "

";
echo "Please Contant Your Systems Administrator with the details";
}

?>

Last edited by jwade_m; 21-01-2008 at 08:33 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #2 (permalink)  
Old 21-01-2008, 04:21 PM
crazyleaf's Avatar
Teeth Designer
 
Join Date: Jan 2007
Location: CrazyLeaf HQ
Gender: Male
Posts: 1,481
Default

Seems ok.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #3 (permalink)  
Old 21-01-2008, 05:51 PM
jwade_m's Avatar
Graphic/Web Designer
 
Join Date: Aug 2007
Location: Indiana, United States
Posts: 196
Default

ok. This is a bit of info from the .sql file in the db folder that the programmer sent.

-- phpMyAdmin SQL Dump
-- version 2.11.0
-- phpMyAdmin | MySQL Database Administration Tool | www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 10, 2008 at 09:10 AM
-- Server version: 5.0.45
-- PHP Version: 5.2.3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `funchill_heartlandmeds`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
`userid` int(11) NOT NULL auto_increment,
`username` varchar(50) default NULL,
`password` varchar(50) default NULL,
`status` int(11) default NULL,
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;



I noticed that it still has this information:
Host: localhost
Database: `funchill_heartlandmeds`


funchill_heartlandmeds is not the name of my database. Does this need changed?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #4 (permalink)  
Old 21-01-2008, 06:22 PM
Toon's Avatar
Netvibes is an Addiction™
 
Join Date: Jan 2007
Location: Sheffield, UK
Gender: Male
Posts: 17,138
Default

It will have to be your DB name
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #5 (permalink)  
Old 21-01-2008, 06:24 PM
crazyleaf's Avatar
Teeth Designer
 
Join Date: Jan 2007
Location: CrazyLeaf HQ
Gender: Male
Posts: 1,481
Default

Toon is right.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #6 (permalink)  
Old 21-01-2008, 06:28 PM
flick's Avatar
official g33k ®
 
Join Date: Aug 2007
Location: Manchester
Gender: Female
Posts: 2,031
Default

i hope those aren't the real connection details you've just provided to the world! if they are i'd definitely advise editing your post quick sharp!
__________________
-- my new favourite g33k site: http://parsed.org --
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #7 (permalink)  
Old 21-01-2008, 06:42 PM
jwade_m's Avatar
Graphic/Web Designer
 
Join Date: Aug 2007
Location: Indiana, United States
Posts: 196
Default

They are incorrect anyway...thank you though
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #8 (permalink)  
Old 21-01-2008, 06:42 PM
crazyleaf's Avatar
Teeth Designer
 
Join Date: Jan 2007
Location: CrazyLeaf HQ
Gender: Male
Posts: 1,481
Default

Quote:
Originally Posted by flick View Post
i hope those aren't the real connection details you've just provided to the world! if they are i'd definitely advise editing your post quick sharp!
Or change them. Anyway they're unless if you don't know the website address.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #9 (permalink)  
Old 21-01-2008, 07:05 PM
flick's Avatar
official g33k ®
 
Join Date: Aug 2007
Location: Manchester
Gender: Female
Posts: 2,031
Default

Quote:
Originally Posted by crazyleaf View Post
Or change them. Anyway they're unless if you don't know the website address.
mysql.jwmull.com
__________________
-- my new favourite g33k site: http://parsed.org --
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
  #10 (permalink)  
Old 21-01-2008, 07:18 PM
crazyleaf's Avatar
Teeth Designer
 
Join Date: Jan 2007
Location: CrazyLeaf HQ
Gender: Male
Posts: 1,481
Default

Quote:
Originally Posted by flick View Post
mysql.jwmull.com
Loool ... didn't notice.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes Page
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thomas Hawk's Digital Connection Toon Photography Forum 3 26-10-2007 11:35 AM
Simulating a slow connection/server LeadMagnet Graphic Design and Web Design Help 1 25-07-2007 08:43 PM
connection Laura Lynne Off Topic 1 10-02-2007 09:48 PM


All times are GMT. The time now is 06:48 AM.



Estetica Design Forum's Privacy Policy
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5