300 Credits if you can help me out here.

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
No, I don't want you to do my math homework. I do, however, seriously need someone to explain a few things to me about this HTML, PHP, MySql, OBGYN world.

My current issue- I'm trying to add a comment box, and I found one that I like quite a bit, so I downloading the files. The readme started out with this

"
This set of scripts and supporting files are intended to be used as in a 'page comments' system on
your site. php and MySQL are required.

The script assumes that you have ALREADY CREATED a database containing a table named page_comments
with the same field names as defined in the included sql file [page_comments.sql]. This can be
used to create the correct table structure using phpAdmin's SQL import function.

Edit the db_conn.php file included in this zipped set of files (in the /includes folder), so that
it includes YOUR values for database name, database username, and database password. "

I...have no idea...what this means. What is a database, how do I create one? What the jesus is Mysql, and do I already have it?

If someone could either set up this comment box for me, or just explain to me how I could do it, I'd doll out 300 credits for the service.

Please and thank you!
 
Last edited:

tesyoo

New Member
Messages
32
Reaction score
0
Points
0
it would be helpful if you give the url where you download the zip.
 

Silent Mike

New Member
Messages
2
Reaction score
0
Points
0
No, I don't want you to do my math homework. I do, however, seriously need someone to explain a few things to me about this HTML, PHP, MySql, OBGYN world.

My current issue- I'm trying to add a comment box, and I found one that I like quite a bit, so I downloading the files. The readme started out with this

"
This set of scripts and supporting files are intended to be used as in a 'page comments' system on
your site. php and MySQL are required.

The script assumes that you have ALREADY CREATED a database containing a table named page_comments
with the same field names as defined in the included sql file [page_comments.sql]. This can be
used to create the correct table structure using phpAdmin's SQL import function.

Edit the db_conn.php file included in this zipped set of files (in the /includes folder), so that
it includes YOUR values for database name, database username, and database password. "

I...have no idea...what this means. What is a database, how do I create one? What the jesus is Mysql, and do I already have it?

If someone could either set up this comment box for me, or just explain to me how I could do it, I'd doll out 300 credits for the service.

Please and thank you!


  1. You already you have PHP and MySQL on your host if your using x10Hosting.
  2. A MySQL Database is where you keep pertinent content such as Passwords, Usernames, E-Mail Addresses, etc...
  3. In order to create one go under your "Databases" tab in your CPanel. Click on MySQL Databases, and from there, you can create your Database.
Okay, so in order to install your script successfully, create a new database, maybe called "pagecomments". Create a MySQL user and password. Then, give your new user access to your database, "pagecomments". Note that you should write down the username and password of your MySQL User.

Now, you'll need to create a new table called "page_comments" in your newly made Database. So go ahead and click on the phpMyAdmin button under the Databases tab. *Check out the small note on the bottom for an easier way, [it's easier for me because I'm not all that familiar with using phpMyAdmin.]*

*Sorry, but since I'm not really familiar with phpMyAdmin, I won't be able to help you any further regarding the database setup.*

Anyways, once you've gotten that whole database setup, it's time to make it to good use. Open the file they want you to edit, which in this case is, "db_conn.php". Then edit the settings inside that file, your database name SHOULD be "yourusername_pagecomments". And the database user name should be the name you choose along with the password.

*Note:

If you have Navicat, it'll be much easier. You can just click Add Table prior to opening a connection with your database. Then you can also execute a batch file or something and that will import your .SQL structure for you.

Hope this helps.
 

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
That was pretty helpful for getting the initial part done, I really appreciate it.
 

kirtik

New Member
Messages
182
Reaction score
0
Points
0
By the way, I can't help with the comment box, but I do recognise your avatar. It's from neopets, isn't it?
 

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
...Yes, yes it is. My website is a Neopets help site.

And I am not ashamed!
Edit:
Hmm...well, since silent mike was able to explain half of that to me, I'm going to go ahead and give him 150 credits (it was very helpful, but I still need help with actually creating the tables.) That means that if anyone can kind of walk me through making the tables right, I'll give them the other 150.
 
Last edited:

gtdg6

New Member
Messages
6
Reaction score
0
Points
0
Okay, for the bit about creating the tables, these should be the steps - in continuation of what has been said before. I'm going to assume you're using phpmyadmin (which you will also find under the databases section in the control panel).

I'm assuming you already have a "database" called pagecomments or whatever - navigate into it, click on the import button, and upload the .sql file - one that you should have in your collection of files in the zip archive. Here's how it'd look:

Step 1, Observe - on the left hand side, the list of databases - if you have created one using your control panel, you should find it here.




(Note: you can click on the image to see a larger version. :) )


Step 2, Go to the database so that you can add a table:




Step 3, Click on the import button:



You'll be asked to browse for a .sql file - the one you should upload is the one that is there in the .zip archive.

Finally, you have a db_conn.php file, which tells the script how to connect to a database. You'll have to open this file in a text editor of your choice (notepad, gedit, whatever) and edit it appropriately. Most likely it is commented, so you won't have trouble - it typically looks like


Code:
$sql_user = "username"; //Replace username with your SQL database username
and so on - as you can see, pretty self-evident if you remember the details that you used when you first created the database!

Now upload all the files in the zip archive to your website, and you should be all set :) Good luck!
 
Last edited:

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
Hmm. I imported the file, but it said "MySQL returned an empty result set (i.e. zero rows). (Query took 0.0578 sec)".
 

gtdg6

New Member
Messages
6
Reaction score
0
Points
0
That is fine - you weren't expecting any result-sets in terms of records, that's why the "zero rows". Does your database have a table now?
 

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
Hmm...well, I THINK it has a table now.

One (hopefully) last question- which files would I upload (is it every file in this package, or just the two I've been using) and do I just upload them to my file manager in the same way I would upload an image or text file?
 

gtdg6

New Member
Messages
6
Reaction score
0
Points
0
That's a bit hard to answer without knowing what exactly you are installing :) Can you point me to the website of the script that you are using? Typically, it won't hurt to create a folder and put all the files in your archive inside it. Then visit

yourdomain.com/pagecomments


or whatever folder you created - the index.php should be able to do the rest for you.

Let me know how it goes, and all the best!
 
Top