Trouble embeding/making serendipity blogs appear

Having trouble installing serendipity?
Post Reply
jonw101
Posts: 1
Joined: Tue Oct 30, 2007 4:40 pm

Trouble embeding/making serendipity blogs appear

Post by jonw101 »

Im having some trouble embeding/making serendipity blogs appear in my html pages... quite frankly i cant figure out how to do it...

I have one page set up by a previous employee but am unable to really understand the connection...

Any help??

Code: Select all

 <?php
$host = "******";
$user = "******";
$pass = "******";
$db	  = "******";

$ms = mysql_pconnect($host, $user, $pass);
if (!$ms){
	echo "Error connecting to database.\n";
}

mysql_select_db($db);

$select2 = mysql_query("SELECT * FROM serendipity_entrycat WHERE categoryid='3' OR categoryid='4' OR categoryid='5' OR categoryid='7' ORDER BY entryid DESC LIMIT 4");
while($row = mysql_fetch_array($select2))
{
$entryid = $row['entryid'];
$catg = $row['categoryid'];

$select = mysql_query("SELECT * FROM serendipity_entries WHERE id=$entryid");
$num_rows = mysql_num_rows($select);
while($row = mysql_fetch_array($select))
  {

$title = $row['title'];
$author = $row['author'];
$body = $row['body'];
$extended = $row['extended'];
  echo '<table width="215px" cellpadding="0" cellspacing="0" border="0" bordercolor="20203B">
<tr>
<td align="left" bgcolor="#DDDDFF">
<font face="Impact" size="3px">
' . $title . '
</font>
</td>
</tr>
<tr>
<td>
<div align="justify">
<font face="Arial">
<a href="http://www.fantasysportsupdate.com/blog.php?id=' . $catg . '&entry=' . $entryid . '">
' . $body . '
</a>
</font>
</div>
</td>
</tr>
</table>';
  }
}
?>
What i want to do is have this work on a different page linking to a different blog.

If I'm not clear, let me know :)
Thanks!!!

EDIT: forgot to say - im using v 1.1.3
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Wow, that's... wow.

Whoever did the embedding for that webpage is accessing the Serendipity database directly, then attempting to print out the results. He gets a lot of values, but he only seems to use $entryid and $body.

Is the blog supposed to be fantasysportsupdate?

And what do you actually get when you try to load this page? Can we have a link to it?
Judebert
---
Website | Wishlist | PayPal
Post Reply