FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Message boards





ainieas
I copied a message board script from a site (dnt ask me which one, i forgot, it was long time ago) and made a few changes. Now could somebody help me to implement it on my web site. Here is the code:

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">

<title>Message board</title>

<meta http-equiv="refresh" content="1800" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />

<meta name="generator" content="Microsoft FrontPage 5.0" />



<script language="javascript">

var urlof ="http://www.geocities.com/from_hell54/"
var titleof ="Geocities.com/from_hell54/"

function AddBookMark()
{
if (document.all)
window.external.AddFavorite(urlof, titleof)
}

function newWindow()
{
window.open("tell.php","","toolbar=no, location=no, directories=no, status=no, scrollbars=no, width=575, height=510");
return false;
}</script>

</head>
<body>

<div id="environment">
<div id="content">

<div id="middlewrap">
<div id="blogposts">
<div id="commentsection">


<div id="commentformsection" style="width: 538; height: 304">


<form action="http://www.geocities.com/from_hell54/wp-comments-post.php" method="post">
<fieldset id="commentform">
<div class="formentry">
<input type="text" name="author" id="author" class="commentinput" value="" size="22" tabindex="1" /><label for="author">Name </label>
</div>

<div class="formentry" style="width: 426; height: 30">
<input type="text" name="email" id="email" class="commentinput" value="" size="22" tabindex="2" /><label for="email">Email</label>
</div>
<div class="formentry">
<input type="text" name="url" id="url" class="commentinput" value="" size="22" tabindex="3" /><label for="url">Website</label>
<p>&nbsp;</div>

<div class="formentry">
<textarea name="comment" id="commenttext" cols="60" rows="10" tabindex="4"></textarea>
</div>
<input name="submit" type="submit" id="commentsubmit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="3150" />
</fieldset>
</form>
</div>

</div>
</div>

</div> </div>
</div>
</body>
</html>


Test page: http://www.geocities.com/from_hell54/mb1.html

Now the problem is I'm a novice and I've no idea what I'm supposed to be doing. So could anyone please tell me how to script the page. I mean when people add comments to the page, it is supposed to get published on that page itself. But i don't know how I'm supposed to get it to work. Please help and tell me what is this http://www.geocities.com/from_hell54/wp-comments-post.php page and how do i create it. thank you!!
DX-Blog
Last time I used geocities, long time ago, they didn't support php/mysql. Might have changed by now, but in order to get this to work you will need to use php in example to store the information either in a file or in a database.

To get it displayed on your page again you will need to make use of php again in order to either load it from the file or load it from the database.

A tutorial about form processing can be found here:
http://www.tutorialized.com/tutorial/Form-Processing-Field-Validation-and-Custom-Error-Pages/8914
ainieas
Quote:
To get it displayed on your page again you will need to make use of php again in order to either load it from the file or load it from the database.


I need help on how to use php to load comments from the file and how to create the file!
DX-Blog
Here you can read about how to write to a file and read from a file:
http://www.free2code.net/plugins/articles/read.php?id=84

The tutorial explains the basics which you will need to know in order to do something like this.

You might also want to make use of this:
http://nl2.php.net/explode

in order to seperate the different comments, you could think of storing comments like:
name|comment|date|etc name|comment|date|etc

different comments would then be seperated by a " " and the comment data would be seperated by a "|", makes using explode easier to create the required arrays. You could also use a newline instead of a space to seperate the different comments, might create an easier to read comments file if you would every look through it, but that's up to you.
ainieas
Thanks!! Smile
Related topics
The FRIHOST Top Albums List
What do most of you do when you are online?
Yahoo shuts down private rooms
Graphic Design Portal (Tutorials, Resources and more...)
Interview: Derek Liu, Gaia Online Anime Community
Hi Everyone
a good Online photo albums...sharing with u
php counter
ME!
The truth about oil...
Homework Sucks
How can I make a linux partition just using Disk Managment.
IGB Gaming - Message Boards for gamers!
imdb message boards are stupid
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.