Jump to content

In need of some help...


BNole

Recommended Posts

I'm decent at working with HTML...but these two topics are things I have no idea about. Any help would be appreciated. Thanks.My first question is probably pretty simple. Basically, I have multiple pages of comments. Everytime I get more comments, I have to add another page. Now, on each page, I have "Page x of x". Is there anyway to make the second x (the total number of pages) some sort of variable such as in regular coding? That way, instead of updating each page, I would just have to edit the variable (listed...somewhere). Maybe it's possible, eh? Now, the second question. When I get a new comment, I just add it to the last page. However, i'd be awesome if I could add it to the first page...and it'd bump to other comments down one. I'm assuming there needs to be some sort of database system for this...anyone know how? Haha. You can see what i'm talking about by going to the page i'm talking about it. It's HERE.

Link to comment
Share on other sites

for your first question, have you thought of using JavaScripte.g.:

var pageNo = 1;var totalPages = 3;function WritePageNo(){   document.write("You are on page " + pageNo + " of " + totalPages);}

Link to comment
Share on other sites

Now, the second question. When I get a new comment, I just add it to the last page. However, i'd be awesome if I could add it to the first page...and it'd bump to other comments down one. I'm assuming there needs to be some sort of database system for this...anyone know how? Haha.
Well, you could just make everyone's comments store to an [http://www.w3schools.com/sql/]SQL[/url] database, which is then rendered using PHP. This would also save yo uthe trouble of having to receive each comment and hard-code it into your website.
Link to comment
Share on other sites

Well, you could just make everyone's comments store to an [http://www.w3schools.com/sql/]SQL[/url] database, which is then rendered using PHP. This would also save yo uthe trouble of having to receive each comment and hard-code it into your website.
I'll take a look at the two pages you linked. If I could figure out how to do that, i'd be loving life. One thing though, i'd still like the ability to control which posts are posted. Really, if I could "submit" them to the database, that'd be perfect. Now for figuring all that out...
Link to comment
Share on other sites

Well, you could have in your database a column named "verified", with an initial state of 0, so that when a person clicks "submit" the comment is committed to the database but will not appear on the public page (because you will only be showing comments with a verified state of 1 there) but instead appear on a password-protected control panel where you then get to click "verfiy" or "delete", the former updating the verified state to 1, the other deleting the entry from the database.

Link to comment
Share on other sites

In effort to make this easier (on me), is there a way I can have the website easily pull the comments from a database? I'll manually input each comment into the database (it'll have the comment and signature). Then, i just need some sort of code to "import" the comment and signature to the actual html page. Is there a tutorial for something like this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...