Page 1 of 1
guestbook
Posted: Sun Aug 29, 2004 8:54 pm
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
Posted: Sun Aug 29, 2004 9:00 pm
by markl999
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';
Posted: Sun Aug 29, 2004 9:01 pm
by feyd
maybe the host doesn't allow non-local connections?
it's saying bobcat.shyper.com right now..
Thanks
Posted: Sun Aug 29, 2004 9:08 pm
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
Posted: Sun Aug 29, 2004 9:09 pm
by markl999
Try setting $hostname to 'localhost' instead.
Cool
Posted: Sun Aug 29, 2004 9:28 pm
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
database
Posted: Sun Aug 29, 2004 9:39 pm
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
Posted: Sun Aug 29, 2004 9:41 pm
by markl999
Change it to:
mysql_select_db($database) or die("Could not select database: ".mysql_error());
See if that provides more information.
Posted: Sun Aug 29, 2004 9:56 pm
by markl999
I see you've solved it now

hey mark
Posted: Sun Aug 29, 2004 9:58 pm
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
one step more
Posted: Sun Aug 29, 2004 10:05 pm
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
Posted: Sun Aug 29, 2004 10:08 pm
by markl999
Hey mark
Posted: Sun Aug 29, 2004 10:32 pm
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