Seems ok.
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 09:33 PM.
Seems ok.
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?
It will have to be your DB name
Toon is right.
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!
They are incorrect anyway...thank you though
Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music. Estetica is a great place for people to get together and help each other out.
Bookmarks