jeg ved altså ikke hvad jeg skal indtaste, jeg er bruger hos
www.frac.dk
min config.php ser sådan ud
<?php
/******************************************************************************
My-GuestBook Configuration !
Copyright Michael Goh Kah Ong, 2002/03.
E-mail: gkom99@yahoo.com
******************************************************************************/
$hostname = "admin.frac.dk"; // example $hostname = "mysql.host";
$database = "guestbook"; // example $database = "gb_data";
$db_login = "root"; // $db_login = "root";
$db_pass = "123"; // $db_pass = "123";
$ad_login = "gkom";
$ad_pass = "123";
$line_num = 10;
?>
og min view_guestbook.php ser sådan ud
<?php
/******************************************************************************
My-GuestBook Admin.php !
Do not alter this file. All changes can be made in config.php file !
Copyright Michael Goh Kah Ong, 2002/03.
E-mail: gkom99@yahoo.com
******************************************************************************/
include "config.php";
$max = $line_num; // configure how many rows of message display per page
$guest_name = $_REQUEST['guest_name'];
$guest_email = $_REQUEST['guest_email'];
$guest_msg = $_REQUEST['guest_msg'];
$pg = $_REQUEST['pg'];
$dbase_link = mysql_connect($hostname, rudik, rudikod) or die("Could not connect");
mysql_select_db($database) or die("Could not select database");
$cur_rows = 0;
$max_rows = $max;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>View GuestBook</title>
<p align=center>
<table align=center border=0 width=525>
<tr bgcolor=navy>
<td>
<center>
<font face=arial size=-1 color=white>
<b>Guest Messages</b>
</font>
</center>
</td>
</tr>
</table>
</p>
</head>
<body>
<center>
<?php
if ($_REQUEST['id']=="1" && $guest_name != "" && $guest_msg != "")
{
$query = "INSERT INTO guest_book (guest_name, guest_email, guest_msg, guest_date, guest_ip) VALUES ('$guest_name','$guest_email','$guest_msg','".date("Y-m-d h:i:s")."','".$HTTP_SERVER_VARS['REMOTE_ADDR']."')";
$result = mysql_query($query) or die("Query failed");
print("<font face=arial size=+2 color=navy>Thank you! $guest_name</font><br><font face=arial size=+1 color=navy>Your message have been successfully <br> added to our guestbook.</font>");
}
elseif ($guest_name == "" && $_REQUEST['id']=="1")
{
print("<font face=arial size=+2 color=red>Error!</font><br><font face=arial size=+1 color=navy>Guest name required.</font>");
}
elseif ($guest_msg == "" && $_REQUEST['id']=="1")
{
print("<font face=arial size=+2 color=red>Error!</font><br><font face=arial size=+1 color=navy>Guest message required.</font>");
}
?>
</center>
<?php
$result = mysql_query("SELECT * FROM guest_book") or die("Query failed");
$num_rows = mysql_num_rows($result);
if($pg!=1)
{
for($i=1;$i<$pg;$i++)
{
$cur_rows=$cur_rows+$max;
$max_rows=$max_rows+$max;
}
}
print("<p align=center><table border=0 bgcolor=black align=center width=520 cellspacing=1>");
$query = "SELECT guest_name, guest_email, guest_date, guest_msg, guest_id FROM guest_book ORDER BY guest_id";
$result = mysql_query($query) or die("Query failed");
$listed=0;
while($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
if($listed>=$cur_rows && $listed< $max_rows)
{
print "<tr bgcolor=white><td><blockquote>";
foreach($line as $guest_rec[$count])
{
if($count==0) print "<br><font face=arial size=1 color=navy><b>Name : </b></font><font face=arial size=-4>$guest_rec[$count]</font>";
if($count==1 && $guest_rec[$count]!="") print "<br><font face=arial size=1 color=navy><b>E-mail : </b></font><a href=mailto:$guest_rec[$count]><font face=arial size=-4>$guest_rec[$count]</font></a>";
if($count==2) print "<br><font face=arial size=1 color=navy><b>Date : </b></font><font face=arial size=-4>$guest_rec[$count]</font>";
if($count==3) print "<br><font face=arial size=1.5 color=navy><u>Message</u></font><br><font face=arial size=-4>$guest_rec[$count]</font>";
$count++;
}
}
$listed++;
$count=0;
print "</blockquote></td></tr>";
}
print("</table><br><table align=center border=0 width=525 cellspacing=0><tr bgcolor=navy><td width=%15 align=left><font face=arial size=2 color=white><a href='guestbook.php' alt='Fill in guestbook'>Guestbook</a></font></td><td><center><font face=arial size=2 color=white>");
$pages = ceil($num_rows/$max);
if($pg!=1)
{
print("<a href=view_guestbook.php?id=0&pg=".($pg-1)." alt='Page ".($pg-1)."'>Previous</a><< ");
}
for($i=1;$i<=$pages;$i++)
{
if($pages>1)
print("<a href=view_guestbook.php?id=0&pg=$i alt='Page $i'><u>$i</u></a> ");
}
if($pg+1<=$pages)
{
print(" >><a href=view_guestbook.php?id=0&pg=".($pg+1)." alt='Page ".($pg+1)."'>Next</a>");
}
print("</font></center></td><td align=right width=%15><font face=arial size=2 color=white>Page $pg of ".(($pages==0)?1:$pages)."</font></td></tr></table>");
mysql_close($dbase_link);
?>
</body>
og min install.php ser sådan ud
<?php
/******************************************************************************
My-GuestBook Installation !
Do not alter this file. All changes can be made in config.php file !
Copyright Michael Goh Kah Ong, 2002/03.
E-mail: gkom99@yahoo.com
******************************************************************************/
include "config.php";
$ad_passc = crypt($ad_pass);
$dbconn = mysql_connect($hostname, $db_login, $db_pass) or die("Could not connect"); // connects to host
print "<div align='center'>Connected to host!<br>";
$query = "CREATE DATABASE $database";
$result = mysql_query($query) or die("Query failed");
print "Database created !<br>";
mysql_select_db($database) or die("Could not select database"); // selecting databes
print "Database selected !<br>";
$query = "CREATE TABLE guest_book (guest_id INT (4), guest_name TEXT, guest_email TEXT, guest_msg LONGTEXT, guest_date DATETIME, guest_ip TEXT)";
$result = mysql_query($query) or die("Query failed"); // running create table powerban query
print "Table guest_book is created !<br>";
$query = "CREATE TABLE guest_book_admin (admin_login TEXT, admin_password TEXT, admin_ip TEXT, admin_date DATETIME)";
$result = mysql_query($query) or die("Query failed"); // running create table powerban_auth query
print "Table guest_book_admin is created !<br>";
$query = "INSERT INTO guest_book_admin (admin_login, admin_password) VALUES ('$ad_login', '$ad_passc')";
$result = mysql_query($query) or die("Query failed"); // creating admin account record
print "Administrator account created !<br></div>";
mysql_close($dbconn); // closing connection with database
?>
linket til gæste bogen er denne
http://www.stenner.frac.dk/guestbook.html
hjælp!!