Hi Everyone,
Does anyone know of a website that tells you in simple terms how to create a guestbook please?
Ive signed up to a free one and paid to have no ads on but i would really like to have one without a link on the bottom
thanks a lot!!!
Hi Everyone,
Does anyone know of a website that tells you in simple terms how to create a guestbook please?
Ive signed up to a free one and paid to have no ads on but i would really like to have one without a link on the bottom
thanks a lot!!!
A minimal, reliable pattern is: store each entry server‑side, expose a small POST endpoint that validates and inserts the entry, and have the page submit via JavaScript (AJAX/fetch) and prepend the returned entry into the DOM so the newest message appears immediately under the form. is right that server storage is needed; however, prefer parameterized queries (PDO/mysqli) and strict output escaping instead of the old mysql_* style. ’s flat‑file idea works for tiny sites but needs careful locking and safe file permissions; a DB (or SQLite) avoids most concurrency problems. ’s suggestion to look for ready scripts is fine if a hosted option is acceptable.
Practical checklist:
Security and UX notes: always escape output (no raw HTML from comments), limit message length, rate‑limit submissions and/or require a simple CAPTCHA to reduce spam, log IPs/UA for abuse control, and use HTTPS. Avoid storing untrusted HTML; if links are allowed, sanitize and render them as safe anchors.
Example client pattern (minimal):
form.addEventListener('submit', async (e) => {
e.preventDefault();
const res = await fetch('/guestbook/submit', { method: 'POST', body: new FormData(form) });
const json = await res.json();
if (json.success) {
const el = document.createElement('div');
el.innerHTML = '<strong>'+escapeHtml(json.name)+'</strong> — <a href="'+escapeAttr(json.website)+'">'+escapeHtml(json.website)+'</a><p>'+escapeHtml(json.message)+'</p>';
entriesContainer.prepend(el);
form.reset();
} else {
alert(json.error || 'Submission failed');
}
}); Prefer server examples using PDO or equivalent parameterized APIs and return JSON so the client can render immediately and safely.
Jump to Post— LukeBennett 0I know a way to make a external page guestbook (a whole page on your website) but if you just want it inserted into a page then ask again and Ill look around...
Here is a script for it > http://www.promosi-web.com/script/guestbook/download
…
Can you be more clear with your question? There are a couple of ways to collect a users information when they visit a website.
You could start with an html form.
What information would you like to collect?
hi thanks for that,
sorry i should have been a bit more clear.
It is basically for people to enter comments on the guestbook about a dog website. Im looking for it to display
~ Name
~ Website
~ Message
I can do the layout etc of how I would like it to look, but Im struggling with what I need to do for it to display as the most recent message once they press submit.
I would like the message to display beneath where they enter their comments and for their message to appear straight away rather than doing it manually??
Thanks again
I know a way to make a external page guestbook (a whole page on your website) but if you just want it inserted into a page then ask again and Ill look around...
Here is a script for it > http://www.promosi-web.com/script/guestbook/download
To use it > 1.Open up index.php and edit all the variables
2. Upload index.php and gbook.dat to the website(CHMOD gbook.dat to 666 (writable))
3. Upload all the .GIF files to the same website directory.
If you get any errors then tell me... The main error is when people dont CHMOD the gbook.dat and you get a writable error.
You could use this mysql/php
MYSQL
CREATE TABLE `guestbook`.`guests` (
`guest_id` INT NOT NULL AUTO_INCREMENT,
`fname` varchar(55) NOT NULL,
`lname` varchar(55) NOT NULL,
`website` varchar(200),
`comment` text,
PRIMARY KEY (`guest_id`)
)
CHARACTER SET utf8; and this PHP
<?php
$con = mysql_connect("localhost","username","password");
//Must create db on server
mysql_select_db("guestbook", $con); //this name is for demo purposes
//table created is named 'guests'
mysql_query("INSERT INTO guests (fname, lname, website,comment)
VALUES ('$_POST[fname]', '$_POST[lname]', '$_POST[website]','$_POST[comment]')");
//This displays the guestbook form html
echo "
<html>
<h1>Please sign-in to our guestbook</h1>
<form name='guestbook' action='{$_SERVER['PHP_SELF']}' method='post'>
<p><label for='fname'>First Name</label><br />
<input type='text' name='fname' value=''></p>
<p><label for='lname'>Last Name</label><br />
<input type='text' name='lname' value=''></p>
<p><label for='website'>website</label><br />
<input type='text' name='website' value=''></p>
<p><label for='comment'>Your Comment</label><br />
<textarea cols='20' rows='10' name='comment' value=''></textarea></p>
<p><input type='submit' value='submit'></p>
</form>
</html>";
//This is where the comments will be pulled from the database and displayed below the guestbook form.
$result=mysql_query("select * from guests");
while ($row=mysql_fetch_assoc($result)){
echo"<div style='background-color:#ccc; padding:1em; width:20%;'>
<p>Name: {$row['fname']} {$row['lname']}</p>
<p>Website: <a href='{$row['website']}'>{$row['website']}</a></p>
<p>Comment: {$row['comment']}</p></div>
<hr />";
}
mysql_close($con)
?> This should get you started but you will want to read about security cuz this example is filled with holes.
Hope it helps.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.