If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Guestbook show 50 caracters of 5 latest entrys on other page  XML
Forum Index » Support Forum
Author Message
Anonymous



My guestbook is running on http://www.oirschotdebeerzen.nl/prikbord/. Thank you for the script. It is the best guestbook i have ver seen.

Can anyone tell me how i can show +-50 caracters of the field "Your Message*: " of the 5 latest entrys on my indexpage www.oirschotdebeerzen.nl/index.php.

Or is it possible to make an extra field ''subject" and show this field of the 5 latest entrys on my indexpage.(i do not use the field ICQ and AIM


For example: of this message i want to show the text "My guestbook is running on http://www.oirschotdebeerzen.nl" on the page www.oirschotdebeerzen.nl/index.php.

Someone else managed this for me with another PHP script with the next code on the page www.oirschotdebeerzen.nl/index.php:

<?
/***********************************************************
/ Alles tussen <? en vraagteken> hoort bij voorbereiden van
/ het opvragen van agendapunten uit de database.
/**********************************************************/

include "/www/oirschotdebeerzen/admin/.database.php";

/***********************************************************
/ functions
/**********************************************************/

function connect($hostname,$username,$password,$databasename) {
$returnval = true;
if (!$returnval=mysql_pconnect($hostname,$username,$password))
$returnval = false;
else
if (!mysql_select_db($databasename,$returnval))
$returnval = false;
return $returnval;
}

/***********************************************************
/ Connecten
/**********************************************************/

if (!connect($hostname,$username,$password,$databasename)) {
echo "connecten met database is mislukt";
}

?>



$query = "select date_format(ag_datum, '%d-%m') as datum, ag_activiteit as activiteit FROM agenda WHERE ag_datum >= curdate() ORDER by ag_datum LIMIT 4";
if (!$result = mysql_query($query)) echo "$query is mislukt";
/***********************************************************
/ Checken hoe lang activiteit tekst is en tabel schrijven
/**********************************************************/
while ($resultaat = mysql_fetch_array($result)) {
if (strlen($resultaat[activiteit]) > 50) $resultaat[activiteit]=substr($resultaat[activiteit],0,50);
echo "
<tr>
<td><FONT FACE='ARIAL' SIZE='2' COLOR='153D51'>$resultaat[datum]</font></td>
<td width='90%'><FONT FACE='ARIAL' SIZE='2' COLOR='153D51'>$resultaat[activiteit]</font></td>
</tr>";
}
?>
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum