[SOLVED] guestbook

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

guestbook

Post by sayee3k1 »

hello buddies

I have a guest book program
http://saispace.shyper.com/guest.zip

I have done everything as in the instruction and created a database and this is my config file.

$hostname ="saispace.shyper.com";
$database ="saispace_guest";
$db_login ="saispace_sai";
$db_pass = "xxxx";
$ad_login = "saispace_sai";
$ad_pass = "xxxx";

$line_num = 10;
?>


but when i execute the http://saispace.shyper.com/guest/install.php

it is not able to connect to the database.

y is tat happening.

any kind of help will be great..

urs
sai
Last edited by sayee3k1 on Sun Aug 29, 2004 9:03 pm, edited 1 time in total.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Access denied for user: 'saispace_sai@bobcat.shyper.com' (Using password: YES)
Not much more to it than that really, the user doesn't have access to the database using that password. So check that user has permissions to access that database using that password. Might just need to use $hostname ='localhost';
Last edited by markl999 on Sun Aug 29, 2004 9:02 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

maybe the host doesn't allow non-local connections?

it's saying bobcat.shyper.com right now..
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

Thanks

Post by sayee3k1 »

helllo

Thanks for the replies.

I don't know y it says bobcat.shyper.com

y is tat happening

what i need to do.

the only thing i did is to MySQL Account Maintenance and created the database

saispace_guest

and then added the username saispace_sai and password.

The Cpanel is same as the other cpanel in other hosting companies.



Sai
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Try setting $hostname to 'localhost' instead.
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

Cool

Post by sayee3k1 »

Hello Mark

Thanks !!!

you made tat so simple.

One last problem

when i executed the install.php ..... it got the connection but it was not able to create the database.

I have already created the database saispace_guest.

so i went ahead in phpMyadmin and created the table guest_book as in the install.php

but now when i submit the form I am not able to able to connect to the database to insert the records.

pls bear with my trival question I am new to Mysql.

Thanks

Sai
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

database

Post by sayee3k1 »

It is not able to select the database

mysql_select_db($database) or die("Could not select database");

$database="saispace_guest" exists in the database

y is tat happening?????

Sai
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Change it to:
mysql_select_db($database) or die("Could not select database: ".mysql_error());

See if that provides more information.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

I see you've solved it now ;)
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

hey mark

Post by sayee3k1 »

Hey mark

Yes tat is done

It is still not inserting the entries. just checking on tat mark.

let me see if i can do tat

Thanks a ton!!!!

urs
sai
sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

one step more

Post by sayee3k1 »

hey mark

How u r able to make entries.

I am still not able to do tat?

it is connected to the database but not able to insert the data.

hmmmmmmmm a bit confused

urs
sai
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

sayee3k1
Forum Newbie
Posts: 20
Joined: Sat Feb 14, 2004 5:41 pm

Hey mark

Post by sayee3k1 »

You were great !!!!

Would u give me the honor by filling my guest book at

http://saispace.shyper.com/guest.php?page=gbook

Thanks

Sai
Post Reply