-
New to php and mySQL
I'm not sure I understand the file structure within Bluehost. For example, I have a sample .php code that tries to upload a file to a mySQL database. I don't think I'm pointing to the database correctly. Here's part of the code I'm trying to work with:
<?php
$db = mysql_connect("localhost", "root","");
mysql_select_db("mybuddy",$db); //connects to our mybuddy database
//replace the above two string's with your database specific values
I saved the .htm and .php forms under the /public_html/ directory. Not sure where exactly the database location i,s even after checking phpMyAdmin.
Any help would be great. Thanks!
-
You need your account name and an underscore added to the front of the username. So if your domain was example.com your account name would be the first 8 characters - examplec - and the username would be examplec_root
The same with the database name which would be examplec_mybuddy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules