Jump to content

Recommended Posts

Posted

Hello everyone I have a question about using MySql and PHP

 

First off I am a Novice when it comes to Web applications and databases,

I have been teaching myself xhtml and css and php So please bear with me.....Thanks in advance

ok first things first

I have created a database using CPANEL and created the table DORlist

I have manually inserted rows of data into the table using phpAdmin

 

I then created a webpage with php code to access the database

and I am having problems with a few things

First off if you look at my site and check out the MYSQL and MYSQL2 page on the nav bar

you can see First that if I have the php code listed below active it breaks my layout. and even more distrubing is that it does not connect to my database

My Database name is rmulher_mulhern1

the table I created in that database is DORlist

 

 

 

 

>    <?
       $username = "rmulher_rmul1966";
       $password = "mypass";
       $hostname = "localhost";	
       $dbh = mysql_connect($hostname, $username, $password) 
    	 or die("<p>Unable to connect to MySQL</p>");
       print "<p>Connected to MySQL</p>";
       $selected = mysql_select_db("rmulher_mulhern1",$dbh) 
       or die("<p>Could not select database</p>");
       mysql_close($dbh);
       ?>

 

Can anyone tell me whats happening here ?

 

Thanks in advance

Robert

Posted

Well from all the testing I have been doing I think I have narrowed it down to the following problem

MySQL says: 1044 : Access denied for user: 'rmulher_rmul1966@localhost' to database 'rmulher_mulhern1'

 

need to find out how to resolve this

I think it has to do with Grant privledges ,

I NEED A Manual bad lol Time to go to bookstore

Posted

Also on TCH mysql your usrname would be something like rmulher_rmul1966@yourdomainname, for example if you registered tch domain you would use rmulher_rmul1966@tch.com as your username

Posted

Thanks everyone, I think I have figured this out finally, It has to do with the "typical newbie" problem with username and password.

 

I have corrected this and now am on the way to making it work as I hope.

 

Thanks again

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...