I'm trying to set up a guest book on my site is there a tutorial for beginners on how to do this on this site somewhere because im not finding it
I'm trying to set up a guest book on my site is there a tutorial for beginners on how to do this on this site somewhere because im not finding it
I haven't seen one on X10's site. However, if you use Softalicious from your CPanel, it will do all of the work for you. If you don't like any of the scripts in Softalicious, just do a google search for something like "free php mysql guestbook" and if you see one you like, post back here and we can help you install it.
gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer
I think i have one made but im now getting an error of something like cant connect nopassword. I dont want people to have to register to sign the guestbook, anyone can sign.. Im thinking its just because i dont have the localhost part right.. what do i need to change it too.. here is part of my code..
$connect = mysql_connect("localhost","root","") or die ("error");
if i cant figure this out i will try to use the site script, i tryed yesterday but it wouldnt let me go to that page for some reason...
in your sql connection the username and password has to be changed. On x10 when you creating database you have to create a user and give permission and associate to the perticular database.
place the corresponding username and password in the mysql_connect command.
If you feel my post is useful then clickto give Reputation (bottom left corner of this post)
X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership
Tech Community | Gouri
how do i go about making the pw and user name if i already created the database??
also can you give me a dummy view of what it would look like on mysql_connect??
in your control panel select mysal databses , there you can see the created databases and in the down htere is an option to create user, Create one and associate it with corresponding database.
Regarding mysql connect use this way.
Code:DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'Database Name'); DEFINE ('DB_USER', 'Database user'); DEFINE ('DB_PASSWORD', 'Databse Password'); // Make the connnection and then select the database. $dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
If you feel my post is useful then clickto give Reputation (bottom left corner of this post)
X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership
Tech Community | Gouri
Error selecting db, i posted what i changed.. Im so close now thanks but im still getting that error...oh and i did make the usernam and password and gave all priviages..
Code:DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'changed_changed'');// I canged this to my db name right?? DEFINE ('DB_USER', 'myaccount');//changed DEFINE ('DB_PASSWORD', 'password123');//changed // Make the connnection and then select the database. $dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
Last edited by kimacc; 11-21-2009 at 12:05 AM.
Last edited by Gouri; 11-21-2009 at 12:10 AM.
If you feel my post is useful then clickto give Reputation (bottom left corner of this post)
X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership
Tech Community | Gouri
thats how i have it set up i think, or do i need to put cpanel, i can post my actual code but i just dont want other people to be able to see it like right now it is kimacc_phpacadamy. or should it be kimacckimacc_phpacadamy???
Edit:
ok i think i know what the problem is it didnt create the username and password, it says "No users associated with this account"
the drop down bocks for users is blank and wont let you type 1 user in... but im think that should be default of 1 anyways
DeleteThere are no users associated with your account.
DeleteThere are no users associated with your account.
Last edited by kimacc; 11-21-2009 at 12:22 AM. Reason: Automerged Doublepost
Ok
I undestand you are confusing between forum username and cpanel username
I am talking about about the user name where you to login into your cpaenl.
like using http://<yourserver>.x10hosting.com:2082
Then you will give username right that i am talking about.
If i am not wrong then it will be kimacckimacc_phpacadamy In this kimacckimacc is your cpanel username and acadamy is databse name right and also the username willl be kimacckimacc_<username> what ever you created and granted privillages
EDIT:
Your said "oh and i did make the usernam and password and gave all priviages.."
Ok give that username here
Last edited by Gouri; 11-21-2009 at 12:25 AM.
If you feel my post is useful then clickto give Reputation (bottom left corner of this post)
X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership
Tech Community | Gouri