53 posts
  • Reviewer
  • Has been a member for 2-3 years
  • Sold between 10 000 and 50 000 dollars
  • Germany
  • Exclusive Author
  • Bought between 10 and 49 items
  • Envato Staff
egotype Reviewer says

Hey Friends,

I am looking for a good but simple Guestbook for a website which is not driven by a MySQL-Database. Did you have experiences with that and could you suggest me some??

Would be nice and greets to you all..

egotype

14 posts
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 100 and 1 000 dollars
Web_ON says

Hi, egotype,

Could you please specify what DB are you using.

296 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • United States
CodeFusion says
If your implying that you want this done without any sort of database, I think your down to two options. XML or text file – neither of which is an elegant solution. They probably be alright for a few hundred “signings”, but would be lousy beyond that. Your probably have to break them down into years and months – depending on how many people sign your book.
<?php
date_default_timezone_set("America/Chicago");
$file = date("Y_m");

$newline = "Name|date|message"."\r\n";
file_put_contents($file, $newline, FILE_APPEND);
?>

then to read the signatures you go something like:

<?php
date_default_timezone_set("America/Chicago");
$file = date("Y_m");

$lines = file($file);
array_pop($lines); //remove the last empty line
foreach ($lines as $row => $line) {
    $signed = explode("|",$line);
    echo "Name: ".$signed['0']."<br />";
    echo "Date: ".$signed['0']."<br />";
    echo "message: ".$signed['0']."<hr />";
}
?>
This does not take any “security” measures into account, so the code should not be used “as-is”, but it should be enough to get you pointed in the right direction.
53 posts
  • Reviewer
  • Has been a member for 2-3 years
  • Sold between 10 000 and 50 000 dollars
  • Germany
  • Exclusive Author
  • Bought between 10 and 49 items
  • Envato Staff
egotype Reviewer says

Hi and thank you for your replies.

@O_Key: i don´t want to use any database for that.

@Code Fusion: It is only a small website and i would give the possibility to the visitors to make some greetings or requests their. Thank you for your work and giving me some coding hints. But i´m totally without experience with coding so for me it would be the better way to find a “ready-to-go” solution for this. I found one solution here in Themeforest that is nearly something what i am looking for.

http://codecanyon.net/item/xml-guestbook/107827

But i want to have this in a smarter and better looking way if you know what i mean ;)

So for me it´s not the problem to buy a good solution here and i hope some people here could make some good suggestions to me.

If you have something please post some links.

Thanks for your help.

5085 posts
  • Australia
  • Bought between 100 and 499 items
  • Community Superstar
  • Exclusive Author
  • Has been a member for 3-4 years
  • Interviewed on the Envato Notes blog
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
Australia says
296 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • United States
CodeFusion says

... I found one solution here in Themeforest that is nearly something what i am looking for. http://codecanyon.net/item/xml-guestbook/107827 But i want to have this in a smarter and better looking way if you know what i mean ;) ...

Looking at the page source, the design looks easy to modify with css – meaning you can completely change the look without altering the code – or at least that’s the way it looks.

53 posts
  • Reviewer
  • Has been a member for 2-3 years
  • Sold between 10 000 and 50 000 dollars
  • Germany
  • Exclusive Author
  • Bought between 10 and 49 items
  • Envato Staff
egotype Reviewer says

Thank you guys, i have found a good solution.

Cheers

by
by
by
by
by
by