Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Connecting Php Site To Database
veightar
post Sep 22 2007, 11:03 PM
Post #1


Newbie [Level 1]
*

Group: Members
Posts: 16
Joined: 12-July 07
Member No.: 46,371



Please Help Me with this site's error
http://gatewaybiz.x10hosting.com/surf/
Go to the top of the page
 
+Quote Post
jlhaslip
post Sep 22 2007, 11:40 PM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,868
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



No-one here can help you, except to suggest that you check, and confirm with the Hosting company, that you are using the correct user-name and password, and that you are attempting to open the correctly named database.
That is what the error suggests.
Answer these questions so we an be of more service to you:

What script are you installing?
Are you allowed databases on that service?
Do they add a prefix to our DB name when you create the DB?
Did you include the prefix?
Go to the top of the page
 
+Quote Post
reconraiders
post Sep 23 2007, 12:30 AM
Post #3


Super Member
*********

Group: Members
Posts: 221
Joined: 6-June 07
Member No.: 44,288



yeah, basically just check all your database info like user, password, db name, host, etc
Go to the top of the page
 
+Quote Post
veightar
post Sep 23 2007, 04:21 PM
Post #4


Newbie [Level 1]
*

Group: Members
Posts: 16
Joined: 12-July 07
Member No.: 46,371



Thank you Guys. Actually my hosting user name is makj and have a db and indeed adds a prefix to my db user name.
I created a db with a named blog and a user name surf. My hosting added the the prefix making the db makj_blog and the username makj_surf. I don't really know whether to include the prefix makj when setting up the script. In the page I showed, I added the prefix makj to it. Should I add the prefix makj to the username or db?
I am indeed installing a surfing script

http://gatewaybiz.x10hosting.com/surf/

Once again thank you.
Go to the top of the page
 
+Quote Post
jlhaslip
post Sep 23 2007, 04:37 PM
Post #5


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,868
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Add the prefix to both the db-name and the db-user-name.
Go to the top of the page
 
+Quote Post
veightar
post Sep 23 2007, 05:28 PM
Post #6


Newbie [Level 1]
*

Group: Members
Posts: 16
Joined: 12-July 07
Member No.: 46,371



I very much appreciate this help. thank you and I'll try that but before then, Please take a look at the file that is mentioned in the page ie. require.inc.php and help me with the changes I need to make in
CODE
<?
global $username;
require 'dconn.php';
session_start();

$username = @$_SESSION["username"];

$connection = mysql_connect($db_server, $db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_name, $connection) or die(mysql_error());

// A few important variables to set
$title = "Gateway SuperSurf";
$motto = "Free hits without the bandwidth";
$siteUrl = "http://gateway.x10hosting.com/surf/"; // remember to include the end slash
$contact_email = "support@gateway.x10hosting.com";
$paypal= "mickeyaff@yahoo.com";
$emailFooter = " - You are receiving this email because you are currently a member of ".$title.".";

Go to the top of the page
 
+Quote Post
.hack//GU
post Sep 24 2007, 08:55 AM
Post #7


Premium Member
********

Group: Members
Posts: 190
Joined: 21-October 05
Member No.: 13,185



QUOTE(veightar @ Sep 23 2007, 05:28 PM) *
I very much appreciate this help. thank you and I'll try that but before then, Please take a look at the file that is mentioned in the page ie. require.inc.php and help me with the changes I need to make in
CODE
<?
global $username;
require 'dconn.php';
session_start();

$username = @$_SESSION["username"];

$connection = mysql_connect($db_server, $db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_name, $connection) or die(mysql_error());

// A few important variables to set
$title = "Gateway SuperSurf";
$motto = "Free hits without the bandwidth";
$siteUrl = "http://gateway.x10hosting.com/surf/"; // remember to include the end slash
$contact_email = "support@gateway.x10hosting.com";
$paypal= "mickeyaff@yahoo.com";
$emailFooter = " - You are receiving this email because you are currently a member of ".$title.".";


how about db_server variable? From what I know, this variable is the one many people have mistaken. You have to confirm with your database server contact, so you can connect them.

Or even your user I guess...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php Quiz Script(20)
  2. Best Rpg Maker Site Ever(1)
  3. The Funniest Websites On The Net(11)
  4. Best Download Site(42)
  5. Import From Excel File Into Mysql Database(7)
  6. How To Save *.swf From A Web Site?(29)
  7. I Hate Site Builders.(38)
  8. Real Paying Site(7)
  9. Php Word Filter(7)
  10. Where Is There A Good Site To Learn Web Html?(18)
  11. Books?!(7)
  12. Database With Mysql++(7)
  13. Cool Site To Learn Languages(4)
  14. Review My Site(18)
  15. Hobby Site/business(6)
  1. Need A Name For A Hosting Site(2)
  2. Great Weather Site(7)
  3. Can't Access My Site....weird Issue(5)
  4. Can't Access My Site An Cpanel(4)
  5. No Site Access(4)
  6. Can We Host Games With Webhosting This Site Provides?(1)
  7. Best Browser To Desighn Your Site To(9)
  8. Free Web Hosting Application [screened] [approved](6)
  9. Database Or Pdf(1)
  10. Is The Database System Gone Again?(10)
  11. I Need Help With Setting Up My Site, Made Using Java(5)
  12. Need Help: Problem Seeing My Site(3)
  13. Can't Login To Any Software On My Site(3)


 



- Lo-Fi Version Time is now: 20th July 2008 - 08:34 PM